mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-18 13:41:21 +01:00
Merge pull request #1961 from wknet123/master-new
Make role name consistent.
This commit is contained in:
commit
642dbe329e
@ -1,7 +1,7 @@
|
||||
<a *ngIf="hasSignedIn" [routerLink]="['/harbor', 'projects']">< {{'PROJECT_DETAIL.PROJECTS' | translate}}</a>
|
||||
<a *ngIf="!hasSignedIn" [routerLink]="['/harbor', 'sign-in']">< {{'SEARCH.BACK' | translate}}</a>
|
||||
|
||||
<h1 class="sub-header-title">{{currentProject.name}} <span class="role-label" *ngIf="isMember">{{roleName | translate}}</span> <span class="role-label" *ngIf="isSystemAdmin">{{ 'MEMBER.SYS_ADMIN' | translate}}</span></h1>
|
||||
<h1 class="sub-header-title">{{currentProject.name}} <span class="role-label" *ngIf="isMember">{{roleName | translate}}</span></h1>
|
||||
<nav class="subnav sub-nav-bg-color">
|
||||
<ul class="nav">
|
||||
<li class="nav-item">
|
||||
|
@ -24,10 +24,6 @@ export class ProjectRoutingResolver implements Resolve<Project>{
|
||||
if(project) {
|
||||
let currentUser = this.sessionService.getCurrentUser();
|
||||
if(currentUser) {
|
||||
if(currentUser.has_admin_role === 1) {
|
||||
project.has_project_admin_role = true;
|
||||
project.role_name = 'sysAdmin';
|
||||
} else {
|
||||
let projectMembers = this.sessionService.getProjectMembers();
|
||||
if(projectMembers) {
|
||||
let currentMember = projectMembers.find(m=>m.user_id === currentUser.user_id);
|
||||
@ -37,6 +33,8 @@ export class ProjectRoutingResolver implements Resolve<Project>{
|
||||
project.role_name = currentMember.role_name;
|
||||
}
|
||||
}
|
||||
if(currentUser.has_admin_role === 1) {
|
||||
project.has_project_admin_role = true;
|
||||
}
|
||||
}
|
||||
return project;
|
||||
|
Loading…
Reference in New Issue
Block a user