restrict links to user roles management to portal Admins

This commit is contained in:
argirok 2023-10-05 14:31:37 +03:00
parent edf8ae835c
commit 1c5a0b22a8
2 changed files with 6 additions and 9 deletions

View File

@ -17,13 +17,13 @@
<div *ngIf="user.role.length > 1">
<span class="uk-text-muted"> Roles </span> <span> {{getTheRolesFormatted(user.role)}} </span>
</div>
<div class="uk-margin-top" *ngIf="user.role.length > 1">
<a *ngIf="isCurator" class="uk-button uk-button-primary" href="https://aai.openaire.eu/roles/index.php"
<div class="uk-margin-top" *ngIf="user.role.length > 1 && isPortalAdministrator">
<a class="uk-button uk-button-primary" href="https://aai.openaire.eu/roles/index.php"
target="_blank">Manage your roles</a> {{" "}}
<a *ngIf="isUserManager" class="uk-button uk-button-primary uk-margin-top"
<a class="uk-button uk-button-primary uk-margin-top"
href="https://aai.openaire.eu/roles/admin.php"
target="_blank">Manage role requests</a>{{" "}}
<a *ngIf="isUserManager" class="uk-button uk-button-primary uk-margin-top"
<a class="uk-button uk-button-primary uk-margin-top"
href="https://aai.openaire.eu/registry"
target="_blank">Manage users</a>
</div>

View File

@ -100,12 +100,9 @@ export class UserComponent {
return formattedRoles.join(", ");
}
get isCurator() {
return Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user);
get isPortalAdministrator() {
return Session.isPortalAdministrator(this.user);
}
get isUserManager() {
return Session.isUserManager(this.user);
}
}