Skip to content

Commit 0f42618

Browse files
feat(auth): Update authorization checks to use IsCommunityAdmin for new community creation
ref: DSC-2699, DSC-2700
1 parent e51a826 commit 0f42618

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/app/shared/menu/providers/new.menu.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@ export class NewMenuProvider extends AbstractExpandableMenuProvider {
5454

5555
public getSubSections(): Observable<PartialMenuSection[]> {
5656
return combineLatest([
57-
this.authorizationService.isAuthorized(FeatureID.IsCollectionAdmin),
5857
this.authorizationService.isAuthorized(FeatureID.IsCommunityAdmin),
5958
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
6059
this.authorizationService.isAuthorized(FeatureID.CanSubmit),
6160
this.authorizationService.isAuthorized(FeatureID.CoarNotifyEnabled),
62-
]).pipe(map(([isCollectionAdmin, isCommunityAdmin, isSiteAdmin, canSubmit, isCoarNotifyEnabled]: [boolean, boolean, boolean, boolean, boolean]) => {
61+
]).pipe(map(([isCommunityAdmin, isSiteAdmin, canSubmit, isCoarNotifyEnabled]: [boolean, boolean, boolean, boolean]) => {
6362

6463
return [
6564
{
@@ -73,7 +72,7 @@ export class NewMenuProvider extends AbstractExpandableMenuProvider {
7372
},
7473
},
7574
{
76-
visible: isCollectionAdmin,
75+
visible: isCommunityAdmin,
7776
model: {
7877
type: MenuItemType.ONCLICK,
7978
text: 'menu.section.new_collection',

0 commit comments

Comments
 (0)