@@ -21,10 +21,10 @@ import { PartialMenuSection } from '../menu-provider.model';
2121import { DSpaceObjectPageMenuProvider } from './helper-providers/dso.menu' ;
2222
2323/**
24- * Menu provider to create the "Edit " option in the DSO edit menu
24+ * Menu provider to create the "Add sub Community" and "Add sub collection " option in the DSO edit menu
2525 */
2626@Injectable ( )
27- export class AddSubObjectsMenuProvider extends DSpaceObjectPageMenuProvider {
27+ export class AddSubComColMenuProvider extends DSpaceObjectPageMenuProvider {
2828 constructor (
2929 protected authorizationDataService : AuthorizationDataService ,
3030 ) {
@@ -33,12 +33,12 @@ export class AddSubObjectsMenuProvider extends DSpaceObjectPageMenuProvider {
3333
3434 public getSectionsForContext ( dso : DSpaceObject ) : Observable < PartialMenuSection [ ] > {
3535 return combineLatest ( [
36- this . authorizationDataService . isAuthorized ( FeatureID . CanEditMetadata , dso . self ) ,
36+ this . authorizationDataService . isAuthorized ( FeatureID . IsCommunityAdmin ) ,
3737 ] ) . pipe (
38- map ( ( [ canEditObject ] ) => {
38+ map ( ( [ isCommunityAdmin ] ) => {
3939 return [
4040 {
41- visible : canEditObject ,
41+ visible : isCommunityAdmin ,
4242 model : {
4343 type : MenuItemType . LINK ,
4444 text : 'community.add.sub-community' ,
@@ -50,7 +50,7 @@ export class AddSubObjectsMenuProvider extends DSpaceObjectPageMenuProvider {
5050 icon : 'plus' ,
5151 } ,
5252 {
53- visible : canEditObject ,
53+ visible : isCommunityAdmin ,
5454 model : {
5555 type : MenuItemType . LINK ,
5656 text : 'community.add.sub-collection' ,
0 commit comments