Skip to content

Commit deb93d7

Browse files
committed
Make the “New collection” menu option visible for Community Admins
1 parent d929c2c commit deb93d7

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('NewMenuProvider', () => {
3838
},
3939
},
4040
{
41-
visible: false,
41+
visible: true,
4242
model: {
4343
type: MenuItemType.ONCLICK,
4444
text: 'menu.section.new_collection',

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)