Skip to content

Commit 3e202a6

Browse files
[DURACOM-133] Remove isAdmin checks
1 parent 709764c commit 3e202a6

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
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)">

src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { EPerson } from '../../../core/eperson/models/eperson.model';
21
import { AuthorizationDataService } from 'src/app/core/data/feature-authorization/authorization-data.service';
32
import { AuthService } from '../../../core/auth/auth.service';
43
import { 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(

0 commit comments

Comments
 (0)