File tree Expand file tree Collapse file tree
src/app/shared/mydspace-actions/workspaceitem Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 </ button >
99
1010 < a class ="btn btn-primary mt-1 mb-3 edit-btn " id ="{{'edit_' + object.id}} "
11- *ngIf ="(isAdmin$ | async) || ( canEditItem$ | async) "
11+ *ngIf ="(canEditItem$ | async) "
1212 ngbTooltip ="{{'submission.workflow.generic.edit-help' | translate}} "
1313 [attr.aria-label] ="'submission.workflow.generic.edit-help' | translate "
1414 [routerLink] ="['/workspaceitems/' + object.id + '/edit'] " role ="button ">
1515 < i class ="fa fa-edit "> </ i > {{'submission.workflow.generic.edit' | translate}}
1616 </ a >
1717
1818 < button type ="button " id ="{{'delete_' + object.id}} " class ="btn btn-danger mt-1 mb-3 "
19- *ngIf ="(isAdmin$ | async) || ( canEditItem$ | async) "
19+ *ngIf ="(canEditItem$ | async) "
2020 ngbTooltip ="{{'submission.workflow.generic.delete-help' | translate}} "
2121 [attr.aria-label] ="'submission.workflow.generic.delete-help' | translate "
2222 (click) ="$event.preventDefault();confirmDiscard(content) ">
Original file line number Diff line number Diff line change 1- import { EPerson } from '../../../core/eperson/models/eperson.model' ;
21import { AuthorizationDataService } from 'src/app/core/data/feature-authorization/authorization-data.service' ;
32import { AuthService } from '../../../core/auth/auth.service' ;
43import { Item } from '../../../core/shared/item.model' ;
@@ -104,9 +103,6 @@ export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent<Work
104103 ngOnInit ( ) : void {
105104 const activeEPerson$ = this . authService . getAuthenticatedUserFromStore ( ) ;
106105
107- this . isAdmin$ = activeEPerson$ . pipe (
108- switchMap ( ( user : EPerson ) => this . authorizationService . isAuthorized ( FeatureID . AdministratorOf , user . uuid ) ) ) ;
109-
110106 this . canEditItem$ = activeEPerson$ . pipe (
111107 switchMap ( ( eperson ) => {
112108 return this . object ?. item . pipe (
You can’t perform that action at this time.
0 commit comments