Commit 706c6bdb authored by AllForNothing's avatar AllForNothing
Browse files

Rename project role


Signed-off-by: default avatarAllForNothing <sshijun@vmware.com>
parent b56a49ef
......@@ -137,7 +137,7 @@ describe('ChartDetailComponent', () => {
"current_user_role_id": 1,
"has_project_admin_role": true,
"is_member": true,
"role_name": 'master',
"role_name": 'maintainer',
"repo_count": 0,
"chart_count": 1,
"registry_id" : 0,
......
......@@ -34,8 +34,8 @@
<label for="checkrads_project_admin">{{'MEMBER.PROJECT_ADMIN' | translate}}</label>
</clr-radio-wrapper>
<clr-radio-wrapper>
<input clrRadio type="radio" name="member_role" id="checkrads_project_master" [value]=4 [(ngModel)]="member.role_id">
<label for="checkrads_project_master">{{'MEMBER.PROJECT_MASTER' | translate}}</label>
<input clrRadio type="radio" name="member_role" id="checkrads_project_maintainer" [value]=4 [(ngModel)]="member.role_id">
<label for="checkrads_project_maintainer">{{'MEMBER.PROJECT_MAINTAINER' | translate}}</label>
</clr-radio-wrapper>
<clr-radio-wrapper>
<input clrRadio type="radio" name="member_role" id="checkrads_developer" [value]=2 [(ngModel)]="member.role_id">
......
......@@ -24,7 +24,7 @@
<clr-dropdown-menu *clrIfOpen>
<label class="dropdown-header">{{'MEMBER.SET_ROLE' | translate}}</label>
<button clrDropdownItem (click)="changeMembersRole(selectedRow, 1)" [disabled]="!(selectedRow.length && hasUpdateMemberPermission) || onlySelf">{{'MEMBER.PROJECT_ADMIN' | translate}}</button>
<button clrDropdownItem (click)="changeMembersRole(selectedRow, 4)" [disabled]="!(selectedRow.length && hasUpdateMemberPermission) || onlySelf">{{'MEMBER.PROJECT_MASTER' | translate}}</button>
<button clrDropdownItem (click)="changeMembersRole(selectedRow, 4)" [disabled]="!(selectedRow.length && hasUpdateMemberPermission) || onlySelf">{{'MEMBER.PROJECT_MAINTAINER' | translate}}</button>
<button clrDropdownItem (click)="changeMembersRole(selectedRow, 2)" [disabled]="!(selectedRow.length && hasUpdateMemberPermission) || onlySelf">{{'MEMBER.DEVELOPER' | translate}}</button>
<button clrDropdownItem (click)="changeMembersRole(selectedRow, 3)" [disabled]="!(selectedRow.length && hasUpdateMemberPermission) || onlySelf">{{'MEMBER.GUEST' | translate}}</button>
<button clrDropdownItem (click)="changeMembersRole(selectedRow, 5)" [disabled]="!(selectedRow.length && hasUpdateMemberPermission) || onlySelf">{{'MEMBER.LIMITED_GUEST' | translate}}</button>
......
......@@ -57,7 +57,7 @@ describe('ProjectDetailComponent', () => {
data: of({
projectResolver: {
ismember: true,
role_name: 'master',
role_name: 'maintainer',
}
})
};
......
......@@ -61,7 +61,7 @@ describe('ArtifactListPageComponent', () => {
data: of({
projectResolver: {
ismember: true,
role_name: 'master',
role_name: 'maintainer',
}
}),
params: {
......
......@@ -51,7 +51,7 @@ describe('ArtifactSummaryComponent', () => {
data: of({
projectResolver: {
ismember: true,
role_name: 'master',
role_name: 'maintainer',
}
})
};
......
......@@ -22,7 +22,7 @@
<h5 class="mt-0 width-7-5">{{'SUMMARY.PROJECT_MEMBER' | translate}}</h5>
<ul class="list-unstyled">
<li>{{ summaryInformation?.project_admin_count }} {{'SUMMARY.ADMIN' | translate}}</li>
<li>{{ summaryInformation?.master_count }} {{'SUMMARY.MASTER' | translate}}</li>
<li>{{ summaryInformation?.maintainer_count }} {{'SUMMARY.MAINTAINER' | translate}}</li>
<li>{{ summaryInformation?.developer_count }} {{'SUMMARY.DEVELOPER' | translate}}</li>
<li>{{ summaryInformation?.guest_count }} {{'SUMMARY.GUEST' | translate}}</li>
<li>{{ summaryInformation?.limited_guest_count }} {{'SUMMARY.LIMITED_GUEST' | translate}}</li>
......
......@@ -59,7 +59,7 @@ describe('SummaryComponent', () => {
repo_count: 0,
chart_count: 0,
project_admin_count: 1,
master_count: 0,
maintainer_count: 0,
developer_count: 0
};
......
......@@ -66,13 +66,13 @@ export const RoleInfo = {
1: "MEMBER.PROJECT_ADMIN",
2: "MEMBER.DEVELOPER",
3: "MEMBER.GUEST",
4: "MEMBER.PROJECT_MASTER",
4: "MEMBER.PROJECT_MAINTAINER",
5: "MEMBER.LIMITED_GUEST",
};
export const RoleMapping = {
"projectAdmin": "MEMBER.PROJECT_ADMIN",
"master": "MEMBER.PROJECT_MASTER",
"maintainer": "MEMBER.PROJECT_MAINTAINER",
"developer": "MEMBER.DEVELOPER",
"guest": "MEMBER.GUEST",
"limitedGuest": "MEMBER.LIMITED_GUEST",
......@@ -82,13 +82,13 @@ export const ProjectRoles = [
{ id: 1, value: "MEMBER.PROJECT_ADMIN" },
{ id: 2, value: "MEMBER.DEVELOPER" },
{ id: 3, value: "MEMBER.GUEST" },
{ id: 4, value: "MEMBER.PROJECT_MASTER" },
{ id: 4, value: "MEMBER.PROJECT_MAINTAINER" },
{ id: 5, value: "MEMBER.LIMITED_GUEST" },
];
export enum Roles {
PROJECT_ADMIN = 1,
PROJECT_MASTER = 4,
PROJECT_MAINTAINER = 4,
DEVELOPER = 2,
GUEST = 3,
LIMITED_GUEST = 5,
......@@ -99,4 +99,4 @@ export enum ResourceType {
REPOSITORY = 1,
CHART_VERSION = 2,
REPOSITORY_TAG = 3,
}
\ No newline at end of file
}
......@@ -282,7 +282,7 @@
"ROLE": "Role",
"SYS_ADMIN": "System Admin",
"PROJECT_ADMIN": "Project Admin",
"PROJECT_MASTER": "Master",
"PROJECT_MAINTAINER": "Maintainer",
"DEVELOPER": "Developer",
"GUEST": "Guest",
"LIMITED_GUEST": "Limited Guest",
......@@ -439,7 +439,7 @@
"ROLE": "Role",
"SYS_ADMIN": "System Admin",
"PROJECT_ADMIN": "Project Admin",
"PROJECT_MASTER": "Master",
"PROJECT_MAINTAINER": "Maintainer",
"DEVELOPER": "Developer",
"GUEST": "Guest",
"LIMITED_GUEST": "Limited Guest",
......@@ -778,7 +778,7 @@
"ARTIFACT_COUNT": "Artifact count",
"STORAGE_CONSUMPTION": "Storage consumption",
"ADMIN": "Admin(s)",
"MASTER": "Master(s)",
"MAINTAINER": "Maintainer(s)",
"DEVELOPER": "Developer(s)",
"GUEST": "Guest(s)",
"LIMITED_GUEST": "Limited guest(s)"
......
......@@ -283,7 +283,7 @@
"ROLE": "Rol",
"SYS_ADMIN": "Administrador del sistema",
"PROJECT_ADMIN": "Administrador del proyecto",
"PROJECT_MASTER": "Mantenedor",
"PROJECT_MAINTAINER": "Mantenedor",
"DEVELOPER": "Desarrollador",
"GUEST": "Invitado",
"LIMITED_GUEST": "Limited Guest",
......@@ -439,7 +439,7 @@
"ROLE": "Role",
"SYS_ADMIN": "System Admin",
"PROJECT_ADMIN": "Project Admin",
"PROJECT_MASTER": "Master",
"PROJECT_MAINTAINER": "Maintainer",
"DEVELOPER": "Developer",
"GUEST": "Guest",
"LIMITED_GUEST": "Limited Guest",
......@@ -779,7 +779,7 @@
"ARTIFACT_COUNT": "Artifact count",
"STORAGE_CONSUMPTION": "Storage consumption",
"ADMIN": "Admin(s)",
"MASTER": "Master(s)",
"MAINTAINER": "Maintainer(s)",
"DEVELOPER": "Developer(s)",
"GUEST": "Guest(s)",
"LIMITED_GUEST": "Limited guest(s)"
......
......@@ -295,7 +295,7 @@
"USER_TYPE": "User",
"SYS_ADMIN": "System Admin",
"PROJECT_ADMIN": "Project Admin",
"PROJECT_MASTER": "préposé à la maintenance",
"PROJECT_MAINTAINER": "préposé à la maintenance",
"DEVELOPER": "Développeur",
"GUEST": "Invité",
"LIMITED_GUEST": "Limited Guest",
......@@ -431,7 +431,7 @@
"ROLE": "Role",
"SYS_ADMIN": "System Admin",
"PROJECT_ADMIN": "Project Admin",
"PROJECT_MASTER": "Master",
"PROJECT_MAINTAINER": "Maintainer",
"DEVELOPER": "Developer",
"GUEST": "Guest",
"LIMITED_GUEST": "Limited Guest",
......@@ -764,7 +764,7 @@
"ARTIFACT_COUNT": "Artifact count",
"STORAGE_CONSUMPTION": "Storage consumption",
"ADMIN": "Admin(s)",
"MASTER": "Master(s)",
"MAINTAINER": "Maintainer(s)",
"DEVELOPER": "Developer(s)",
"GUEST": "Guest(s)",
"LIMITED_GUEST": "Limited guest(s)"
......
......@@ -280,7 +280,7 @@
"ROLE": "Função",
"SYS_ADMIN": "Administrador do Sistema",
"PROJECT_ADMIN": "Administrador do Projeto",
"PROJECT_MASTER": "Mantenedor",
"PROJECT_MAINTAINER": "Mantenedor",
"DEVELOPER": "Desenvolvedor",
"GUEST": "Visitante",
"LIMITED_GUEST": "Limited Guest",
......@@ -387,7 +387,7 @@
"ROLE": "Role",
"SYS_ADMIN": "System Admin",
"PROJECT_ADMIN": "Project Admin",
"PROJECT_MASTER": "Master",
"PROJECT_MAINTAINER": "Maintainer",
"DEVELOPER": "Developer",
"GUEST": "Guest",
"LIMITED_GUEST": "Limited Guest",
......@@ -775,7 +775,7 @@
"ARTIFACT_COUNT": "Artifact count",
"STORAGE_CONSUMPTION": "Storage consumption",
"ADMIN": "Admin(s)",
"MASTER": "Master(s)",
"MAINTAINER": "Maintainer(s)",
"DEVELOPER": "Developer(s)",
"GUEST": "Guest(s)",
"LIMITED_GUEST": "Limited guest(s)"
......
......@@ -282,7 +282,7 @@
"ROLE": "Rol",
"SYS_ADMIN": "Sistem Yöneticisi",
"PROJECT_ADMIN": "Proje Yöneticisi",
"PROJECT_MASTER": "Uzman",
"PROJECT_MAINTAINER": "Uzman",
"DEVELOPER": "Geliştirici",
"GUEST": "Konuk",
"LIMITED_GUEST": "Limited Guest",
......@@ -439,7 +439,7 @@
"ROLE": "Rol",
"SYS_ADMIN": "Sistem Yöneticisi",
"PROJECT_ADMIN": "Proje Yöneticisi",
"PROJECT_MASTER": "Uzman",
"PROJECT_MAINTAINER": "Uzman",
"DEVELOPER": "Geliştirici",
"GUEST": "Misafir",
"LIMITED_GUEST": "Limited Guest",
......@@ -778,7 +778,7 @@
"ARTIFACT_COUNT": "Buluntu adeti",
"STORAGE_CONSUMPTION": "Depolama tüketimi",
"ADMIN": "Yönetici(ler)",
"MASTER": "Uzman(lar)",
"MAINTAINER": "Uzman(lar)",
"DEVELOPER": "Geliştirici(ler)",
"GUEST": "Misafir(ler)",
"LIMITED_GUEST": "Limited guest(s)"
......
......@@ -282,7 +282,7 @@
"ROLE": "角色",
"SYS_ADMIN": "系统管理员",
"PROJECT_ADMIN": "项目管理员",
"PROJECT_MASTER": "维护人员",
"PROJECT_MAINTAINER": "维护人员",
"DEVELOPER": "开发人员",
"GUEST": "访客",
"LIMITED_GUEST": "受限访客",
......@@ -438,7 +438,7 @@
"ROLE": "权限",
"SYS_ADMIN": "系统管理员",
"PROJECT_ADMIN": "项目管理员",
"PROJECT_MASTER": "维护人员",
"PROJECT_MAINTAINER": "维护人员",
"DEVELOPER": "开发者",
"GUEST": "访客",
"LIMITED_GUEST": "受限访客",
......@@ -779,7 +779,7 @@
"ARTIFACT_COUNT": "Artifact 数量",
"STORAGE_CONSUMPTION": "存储消耗",
"ADMIN": "管理员",
"MASTER": "维护人员",
"MAINTAINER": "维护人员",
"DEVELOPER": "开发者",
"GUEST": "访客",
"LIMITED_GUEST": "受限访客"
......
......@@ -280,7 +280,7 @@
"ROLE": "角色",
"SYS_ADMIN": "系統管理員",
"PROJECT_ADMIN": "項目管理員",
"PROJECT_MASTER": "維護人員",
"PROJECT_MAINTAINER": "維護人員",
"DEVELOPER": "開發人員",
"GUEST": "訪客",
"LIMITED_GUEST": "受限訪客",
......@@ -436,7 +436,7 @@
"ROLE": "權限",
"SYS_ADMIN": "系統管理員",
"PROJECT_ADMIN": "項目管理員",
"PROJECT_MASTER": "維護人員",
"PROJECT_MAINTAINER": "維護人員",
"DEVELOPER": "開發者",
"GUEST": "訪客",
"LIMITED_GUEST": "受限訪客"
......@@ -775,7 +775,7 @@
"ARTIFACT_COUNT":"工件數量",
"STORAGE_CONSUMPTION": "存儲消耗",
"ADMIN": "管理員",
"MASTER": "維護人員",
"MAINTAINER": "維護人員",
"DEVELOPER": "開發者",
"GUEST": "訪客",
"LIMITED_GUEST": "受限訪客"
......
......@@ -133,9 +133,9 @@ export const PROJECT_ROOTS = [
LABEL: "GROUP.PROJECT_ADMIN"
},
{
NAME: "master",
NAME: "maintainer",
VALUE: 4,
LABEL: "GROUP.PROJECT_MASTER"
LABEL: "GROUP.PROJECT_MAINTAINER"
},
{
NAME: "developer",
......
......@@ -87,7 +87,7 @@ User Can Not Change Role
#this keyworkd seems will not use any more, will delete in the future
Non-admin View Member Account
[arguments] ${times}
Xpath Should Match X Times //clr-dg-row-master ${times}
Xpath Should Match X Times //clr-dg-row-maintainer ${times}
User Can Not Add Member
Retry Wait Until Page Contains Element xpath=//button[@disabled='' and contains(.,'User')]
......@@ -192,7 +192,7 @@ User Should Be Admin
Logout Harbor
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v2
User Should Be Master
User Should Be Maintainer
[Arguments] ${user} ${pwd} ${project} ${is_oidc_mode}=${false}
Run Keyword If ${is_oidc_mode} == ${false} Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
... ELSE Sign In Harbor With OIDC User ${HARBOR_URL} username=${user}
......@@ -202,7 +202,7 @@ User Should Be Master
Go Into Project ${project}
Delete Repo ${project}
Switch To Member
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Master')]
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Maintainer')]
Logout Harbor
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v3
......
......@@ -196,8 +196,8 @@ Manage Project Member Without Sign In Harbor
User Should Be Developer ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
Change User Role In Project ${sign_in_user} ${sign_in_pwd} project${d} ${test_user1} Admin is_oidc_mode=${is_oidc_mode}
User Should Be Admin ${test_user1} ${sign_in_pwd} project${d} ${test_user2} is_oidc_mode=${is_oidc_mode}
Change User Role In Project ${sign_in_user} ${sign_in_pwd} project${d} ${test_user1} Master is_oidc_mode=${is_oidc_mode}
User Should Be Master ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
Change User Role In Project ${sign_in_user} ${sign_in_pwd} project${d} ${test_user1} Maintainer is_oidc_mode=${is_oidc_mode}
User Should Be Maintainer ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
Manage Project Member ${sign_in_user} ${sign_in_pwd} project${d} ${test_user1} Remove is_oidc_mode=${is_oidc_mode}
User Should Not Be A Member Of Project ${test_user1} ${sign_in_pwd} project${d} is_oidc_mode=${is_oidc_mode}
Push image ip=${ip} user=${sign_in_user} pwd=${sign_in_pwd} project=project${d} image=hello-world
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment