Skip to content

Commit f0b526c

Browse files
Mattia VianelliAndrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2024_02_x/DSC-2726 (pull request DSpace#4082)
DSC-2726 Added isCommunityAdmin or isSiteAdmin check for the communities and collection menu entry Approved-by: Andrea Barbasso
2 parents 9470c9b + e17ab08 commit f0b526c

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/app/menu-resolver.service.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export class MenuResolverService {
303303
{
304304
id: `browse_global_communities_and_collections`,
305305
active: false,
306-
visible: !environment.layout.navbar.showCommunityCollection && isCollectionAdmin,
306+
visible: !environment.layout.navbar.showCommunityCollection && (isCollectionAdmin || isCommunityAdmin || isSiteAdmin),
307307
model: {
308308
type: MenuItemType.LINK,
309309
text: `menu.section.communities_and_collections`,
@@ -845,19 +845,6 @@ export class MenuResolverService {
845845
this.authorizationService.isAuthorized(FeatureID.AdministratorOf)
846846
.subscribe((authorized) => {
847847
const menuList = [
848-
/* Communities & Collections */
849-
{
850-
id: 'browse_global_communities_and_collections',
851-
active: false,
852-
visible: authorized && !environment.layout.navbar.showCommunityCollection,
853-
model: {
854-
type: MenuItemType.LINK,
855-
text: `menu.section.communities_and_collections`,
856-
link: `/community-list`,
857-
} as LinkMenuItemModel,
858-
icon: 'list-alt',
859-
index: 2,
860-
},
861848
/* Admin Search */
862849
{
863850
id: 'admin_search',

0 commit comments

Comments
 (0)