From 706c6bdb2bfa7a669c9b0fbed83d4b38130432c7 Mon Sep 17 00:00:00 2001 From: AllForNothing Date: Wed, 8 Jul 2020 09:11:17 +0800 Subject: [PATCH] Rename project role Signed-off-by: AllForNothing --- .../chart-detail/chart-detail.component.spec.ts | 2 +- .../member/add-member/add-member.component.html | 4 ++-- .../src/app/project/member/member.component.html | 2 +- .../project-detail/project-detail.component.spec.ts | 2 +- .../artifact-list-page.component.spec.ts | 2 +- .../artifact/artifact-summary.component.spec.ts | 2 +- .../src/app/project/summary/summary.component.html | 2 +- .../src/app/project/summary/summary.component.spec.ts | 2 +- src/portal/src/app/shared/shared.const.ts | 10 +++++----- src/portal/src/i18n/lang/en-us-lang.json | 6 +++--- src/portal/src/i18n/lang/es-es-lang.json | 6 +++--- src/portal/src/i18n/lang/fr-fr-lang.json | 6 +++--- src/portal/src/i18n/lang/pt-br-lang.json | 6 +++--- src/portal/src/i18n/lang/tr-tr-lang.json | 6 +++--- src/portal/src/i18n/lang/zh-cn-lang.json | 6 +++--- src/portal/src/i18n/lang/zh-tw-lang.json | 6 +++--- src/portal/src/lib/entities/shared.const.ts | 4 ++-- tests/resources/Harbor-Pages/Project-Members.robot | 6 +++--- tests/resources/TestCaseBody.robot | 4 ++-- 19 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts index e21e5b7d0..ffdf647e6 100644 --- a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts @@ -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, diff --git a/src/portal/src/app/project/member/add-member/add-member.component.html b/src/portal/src/app/project/member/add-member/add-member.component.html index de4028ee1..340571a5c 100644 --- a/src/portal/src/app/project/member/add-member/add-member.component.html +++ b/src/portal/src/app/project/member/add-member/add-member.component.html @@ -34,8 +34,8 @@ - - + + diff --git a/src/portal/src/app/project/member/member.component.html b/src/portal/src/app/project/member/member.component.html index b718ab5ac..08f760ecf 100644 --- a/src/portal/src/app/project/member/member.component.html +++ b/src/portal/src/app/project/member/member.component.html @@ -24,7 +24,7 @@ - + diff --git a/src/portal/src/app/project/project-detail/project-detail.component.spec.ts b/src/portal/src/app/project/project-detail/project-detail.component.spec.ts index ec5cd9154..0684574fa 100644 --- a/src/portal/src/app/project/project-detail/project-detail.component.spec.ts +++ b/src/portal/src/app/project/project-detail/project-detail.component.spec.ts @@ -57,7 +57,7 @@ describe('ProjectDetailComponent', () => { data: of({ projectResolver: { ismember: true, - role_name: 'master', + role_name: 'maintainer', } }) }; diff --git a/src/portal/src/app/project/repository/artifact-list-page/artifact-list-page.component.spec.ts b/src/portal/src/app/project/repository/artifact-list-page/artifact-list-page.component.spec.ts index da10e9862..4218ae8f7 100644 --- a/src/portal/src/app/project/repository/artifact-list-page/artifact-list-page.component.spec.ts +++ b/src/portal/src/app/project/repository/artifact-list-page/artifact-list-page.component.spec.ts @@ -61,7 +61,7 @@ describe('ArtifactListPageComponent', () => { data: of({ projectResolver: { ismember: true, - role_name: 'master', + role_name: 'maintainer', } }), params: { diff --git a/src/portal/src/app/project/repository/artifact/artifact-summary.component.spec.ts b/src/portal/src/app/project/repository/artifact/artifact-summary.component.spec.ts index 78b7a51ed..7bed83c73 100644 --- a/src/portal/src/app/project/repository/artifact/artifact-summary.component.spec.ts +++ b/src/portal/src/app/project/repository/artifact/artifact-summary.component.spec.ts @@ -51,7 +51,7 @@ describe('ArtifactSummaryComponent', () => { data: of({ projectResolver: { ismember: true, - role_name: 'master', + role_name: 'maintainer', } }) }; diff --git a/src/portal/src/app/project/summary/summary.component.html b/src/portal/src/app/project/summary/summary.component.html index 6af3f544e..2a80e716b 100644 --- a/src/portal/src/app/project/summary/summary.component.html +++ b/src/portal/src/app/project/summary/summary.component.html @@ -22,7 +22,7 @@
{{'SUMMARY.PROJECT_MEMBER' | translate}}
  • {{ summaryInformation?.project_admin_count }} {{'SUMMARY.ADMIN' | translate}}
  • -
  • {{ summaryInformation?.master_count }} {{'SUMMARY.MASTER' | translate}}
  • +
  • {{ summaryInformation?.maintainer_count }} {{'SUMMARY.MAINTAINER' | translate}}
  • {{ summaryInformation?.developer_count }} {{'SUMMARY.DEVELOPER' | translate}}
  • {{ summaryInformation?.guest_count }} {{'SUMMARY.GUEST' | translate}}
  • {{ summaryInformation?.limited_guest_count }} {{'SUMMARY.LIMITED_GUEST' | translate}}
  • diff --git a/src/portal/src/app/project/summary/summary.component.spec.ts b/src/portal/src/app/project/summary/summary.component.spec.ts index 4b150581b..cb5ce2334 100644 --- a/src/portal/src/app/project/summary/summary.component.spec.ts +++ b/src/portal/src/app/project/summary/summary.component.spec.ts @@ -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 }; diff --git a/src/portal/src/app/shared/shared.const.ts b/src/portal/src/app/shared/shared.const.ts index e53673ba9..0eeea6c5c 100644 --- a/src/portal/src/app/shared/shared.const.ts +++ b/src/portal/src/app/shared/shared.const.ts @@ -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 +} diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index c4a480786..36832736b 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -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)" diff --git a/src/portal/src/i18n/lang/es-es-lang.json b/src/portal/src/i18n/lang/es-es-lang.json index b7d21acff..ffa7ce2c7 100644 --- a/src/portal/src/i18n/lang/es-es-lang.json +++ b/src/portal/src/i18n/lang/es-es-lang.json @@ -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)" diff --git a/src/portal/src/i18n/lang/fr-fr-lang.json b/src/portal/src/i18n/lang/fr-fr-lang.json index 5f918dbb3..ef9a18172 100644 --- a/src/portal/src/i18n/lang/fr-fr-lang.json +++ b/src/portal/src/i18n/lang/fr-fr-lang.json @@ -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)" diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index c63fe0ad3..d1f862514 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -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)" diff --git a/src/portal/src/i18n/lang/tr-tr-lang.json b/src/portal/src/i18n/lang/tr-tr-lang.json index 7767e241c..83cbe6807 100644 --- a/src/portal/src/i18n/lang/tr-tr-lang.json +++ b/src/portal/src/i18n/lang/tr-tr-lang.json @@ -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)" diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index 9fadd1b0f..fd54c4b59 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -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": "受限访客" diff --git a/src/portal/src/i18n/lang/zh-tw-lang.json b/src/portal/src/i18n/lang/zh-tw-lang.json index 318f4adae..873d29b94 100644 --- a/src/portal/src/i18n/lang/zh-tw-lang.json +++ b/src/portal/src/i18n/lang/zh-tw-lang.json @@ -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": "受限訪客" diff --git a/src/portal/src/lib/entities/shared.const.ts b/src/portal/src/lib/entities/shared.const.ts index bb42613c1..663faccab 100644 --- a/src/portal/src/lib/entities/shared.const.ts +++ b/src/portal/src/lib/entities/shared.const.ts @@ -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", diff --git a/tests/resources/Harbor-Pages/Project-Members.robot b/tests/resources/Harbor-Pages/Project-Members.robot index 1b64c245c..cf4783719 100644 --- a/tests/resources/Harbor-Pages/Project-Members.robot +++ b/tests/resources/Harbor-Pages/Project-Members.robot @@ -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 diff --git a/tests/resources/TestCaseBody.robot b/tests/resources/TestCaseBody.robot index e5c9aa958..cccf21fea 100644 --- a/tests/resources/TestCaseBody.robot +++ b/tests/resources/TestCaseBody.robot @@ -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