[DURACOM-133] Remove isAdmin checks

This commit is contained in:
Alisa Ismailati
2023-05-18 11:30:51 +02:00
parent 709764c8af
commit 3e202a67f1
2 changed files with 2 additions and 6 deletions

View File

@@ -8,7 +8,7 @@
</button>
<a class="btn btn-primary mt-1 mb-3 edit-btn" id="{{'edit_' + object.id}}"
*ngIf="(isAdmin$ | async) || (canEditItem$ | async)"
*ngIf="(canEditItem$ | async)"
ngbTooltip="{{'submission.workflow.generic.edit-help' | translate}}"
[attr.aria-label]="'submission.workflow.generic.edit-help' | translate"
[routerLink]="['/workspaceitems/' + object.id + '/edit']" role="button">
@@ -16,7 +16,7 @@
</a>
<button type="button" id="{{'delete_' + object.id}}" class="btn btn-danger mt-1 mb-3"
*ngIf="(isAdmin$ | async) || (canEditItem$ | async)"
*ngIf="(canEditItem$ | async)"
ngbTooltip="{{'submission.workflow.generic.delete-help' | translate}}"
[attr.aria-label]="'submission.workflow.generic.delete-help' | translate"
(click)="$event.preventDefault();confirmDiscard(content)">

View File

@@ -1,4 +1,3 @@
import { EPerson } from '../../../core/eperson/models/eperson.model';
import { AuthorizationDataService } from 'src/app/core/data/feature-authorization/authorization-data.service';
import { AuthService } from '../../../core/auth/auth.service';
import { Item } from '../../../core/shared/item.model';
@@ -104,9 +103,6 @@ export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent<Work
ngOnInit(): void {
const activeEPerson$ = this.authService.getAuthenticatedUserFromStore();
this.isAdmin$ = activeEPerson$.pipe(
switchMap((user: EPerson) => this.authorizationService.isAuthorized(FeatureID.AdministratorOf, user.uuid)));
this.canEditItem$ = activeEPerson$.pipe(
switchMap((eperson) => {
return this.object?.item.pipe(