97183 Hide sidebar items w/o appropriate permissions.

See https://github.com/DSpace/dspace-angular/issues/1643

Sidebar now omits "New" and/or "Edit" options in the sidebar if the user does
not have permissions to respectively create new Items or edit Items.

If this results in an empty sidebar, the sidebar is hidden in its entirety.
This commit is contained in:
Koen Pauwels
2022-12-06 11:30:46 +01:00
parent 627da93e23
commit 68bac1f400
5 changed files with 80 additions and 43 deletions

View File

@@ -61,7 +61,7 @@ export class RootComponent implements OnInit {
}
ngOnInit() {
this.sidebarVisible = this.menuService.isMenuVisible(MenuID.ADMIN);
this.sidebarVisible = this.menuService.isMenuVisibleWithVisibleSections(MenuID.ADMIN);
this.collapsedSidebarWidth = this.cssService.getVariable('collapsedSidebarWidth');
this.totalSidebarWidth = this.cssService.getVariable('totalSidebarWidth');