mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DURACOM-133] Remove isAdmin checks
This commit is contained in:
@@ -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)">
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user