mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
add QA authorization config
This commit is contained in:
@@ -34,4 +34,5 @@ export enum FeatureID {
|
|||||||
CanEditItem = 'canEditItem',
|
CanEditItem = 'canEditItem',
|
||||||
CanRegisterDOI = 'canRegisterDOI',
|
CanRegisterDOI = 'canRegisterDOI',
|
||||||
CanSubscribe = 'canSubscribeDso',
|
CanSubscribe = 'canSubscribeDso',
|
||||||
|
CanSeeQA = 'canSeeQA'
|
||||||
}
|
}
|
||||||
|
@@ -530,13 +530,17 @@ export class MenuResolver implements Resolve<boolean> {
|
|||||||
* Create menu sections dependent on whether or not the current user is a site administrator
|
* Create menu sections dependent on whether or not the current user is a site administrator
|
||||||
*/
|
*/
|
||||||
createSiteAdministratorMenuSections() {
|
createSiteAdministratorMenuSections() {
|
||||||
this.authorizationService.isAuthorized(FeatureID.AdministratorOf).subscribe((authorized) => {
|
combineLatest([
|
||||||
|
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
|
||||||
|
this.authorizationService.isAuthorized(FeatureID.CanSeeQA)
|
||||||
|
])
|
||||||
|
.subscribe(([authorized, canSeeQA]) => {
|
||||||
const menuList = [
|
const menuList = [
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
{
|
{
|
||||||
id: 'notifications',
|
id: 'notifications',
|
||||||
active: false,
|
active: false,
|
||||||
visible: authorized,
|
visible: authorized && canSeeQA,
|
||||||
model: {
|
model: {
|
||||||
type: MenuItemType.TEXT,
|
type: MenuItemType.TEXT,
|
||||||
text: 'menu.section.notifications'
|
text: 'menu.section.notifications'
|
||||||
|
Reference in New Issue
Block a user