Skip to content

Commit

Permalink
fix: support loadThumbnailithKs for KMS Analytics PLAT-24115
Browse files Browse the repository at this point in the history
  • Loading branch information
amirch1 committed Jan 29, 2023
1 parent 5871aa2 commit d212652
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/shared/services/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ export class AppService implements OnDestroy {
// weak ks such as KMS user cannot load user roles. In that case we will use the getCurrentPermissions API to load current permissions disregarding user roles
// if getCurrentPermissions didn't return a valid result (for example an exception) - we will init the permissions manager with no permissions as all
const currentPermissions = currentPermissionsResponse && currentPermissionsResponse.result ? currentPermissionsResponse.result.split(',') : [];
// since FEATURE_LOAD_THUMBNAIL_WITH_KS is a partner feature it is not returned by the getCurrentPermissions API so it is send from KMS using configuration
if (analyticsConfig.loadThumbnailWithKs) {
currentPermissions.push('FEATURE_LOAD_THUMBNAIL_WITH_KS');
}
this._permissionsService.load(currentPermissions, currentPermissions);
this._permissionsLoaded.next(true);
initPlayers();
Expand Down
1 change: 1 addition & 0 deletions src/configuration/analytics-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface AnalyticsConfig {
ks?: string;
pid?: string;
locale?: string;
loadThumbnailWithKs?: boolean;
dateFormat?: string;
showNavBar?: boolean;
isHosted?: boolean;
Expand Down

0 comments on commit d212652

Please sign in to comment.