From b1967e0e9831a5410197a56695bb8572d712bc59 Mon Sep 17 00:00:00 2001 From: Scott Reisdorf Date: Fri, 7 Dec 2018 06:56:54 -0800 Subject: [PATCH] KYLO-2810 UI doesnt allow changing permissions of feed when permitted --- .../define-feed-ng2/services/feed-access-control.service.ts | 4 ++-- .../steps/permissions/define-feed-permissions.component.ts | 2 +- .../setup-guide-summary/setup-guide-summary.component.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/services/feed-access-control.service.ts b/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/services/feed-access-control.service.ts index ab3073db8d..2f22025346 100644 --- a/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/services/feed-access-control.service.ts +++ b/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/services/feed-access-control.service.ts @@ -61,8 +61,8 @@ constructor(@Inject("AccessControlService") private accessControlService:AccessC subject.next( new FeedAccessControl({ accessMessage:accessMessage, datasourceAccess:datasourceAccess, - allowEdit : entityEditAccess && allowEditAccess && datasourceAccess, - allowChangePermissions : entityAccessControlled && entityPermissionAccess && allowEditAccess, + allowEdit : entityEditAccess && (allowEditAccess || allowAdminAccess) && datasourceAccess, + allowChangePermissions : entityAccessControlled && entityPermissionAccess && (allowEditAccess || allowAdminAccess), allowAdmin : allowAdminAccess, allowSlaAccess : slaAccess, allowExport : entityExportAccess && allowExport, diff --git a/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/steps/permissions/define-feed-permissions.component.ts b/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/steps/permissions/define-feed-permissions.component.ts index e0b75b4c93..a4dc46d836 100644 --- a/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/steps/permissions/define-feed-permissions.component.ts +++ b/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/steps/permissions/define-feed-permissions.component.ts @@ -48,7 +48,7 @@ export class DefineFeedPermissionsComponent extends AbstractFeedStepComponent { checkEntityAccess() { let entityAccessControlCheck:Observable = of(this.accessControlService.checkEntityAccessControlled()); entityAccessControlCheck.subscribe((result: any) => { - this.displayEditActions = this.accessControlService.isEntityAccessControlled() && this.feed.accessControl.allowAdmin; + this.displayEditActions = this.accessControlService.isEntityAccessControlled() && this.feed.accessControl.allowChangePermissions; }, (err: any) => { console.log("Error checking if entity access control is enabled"); }); diff --git a/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/summary/setup-guide-summary/setup-guide-summary.component.ts b/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/summary/setup-guide-summary/setup-guide-summary.component.ts index 31a525dafa..ee5f0cd68b 100644 --- a/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/summary/setup-guide-summary/setup-guide-summary.component.ts +++ b/ui/ui-app/src/main/resources/static/js/feed-mgr/feeds/define-feed-ng2/summary/setup-guide-summary/setup-guide-summary.component.ts @@ -157,7 +157,7 @@ export class SetupGuideSummaryComponent extends AbstractLoadFeedComponent { * @returns {boolean} */ showSetPermissions() { - return this.feed.accessControl.allowAdmin; + return this.feed.accessControl.allowChangePermissions; } /**