Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update change role tooltip for archived users (#7388)
boojack94e4d39b103b
diff --git a/frontend/src/components/User/Settings/UserTable.vue b/frontend/src/components/User/Settings/UserTable.vueindex 18db4e054a..3955f236ad 100644--- a/frontend/src/components/User/Settings/UserTable.vue+++ b/frontend/src/components/User/Settings/UserTable.vue@@ -274,7 +274,10 @@ const allowEdit = computed(() => {});const allowChangeRole = (user: User) => {- if (user.name === SYSTEM_BOT_USER_NAME) {+ if (+ user.name === SYSTEM_BOT_USER_NAME ||+ user.userType === UserType.SERVICE_ACCOUNT+ ) {return false;}@@ -290,8 +293,18 @@ const changeRoleTooltip = (user: User): string => {if (allowChangeRole(user)) {return "";}- if (user.name === SYSTEM_BOT_USER_NAME) {- return t("settings.members.tooltip.cannot-change-role-of-systembot");+ // Non-actived user cannot be changed role, so the tooltip should be empty.+ if (user.state !== State.ACTIVE) {+ return "";+ }++ if (+ user.name === SYSTEM_BOT_USER_NAME ||+ user.userType === UserType.SERVICE_ACCOUNT+ ) {+ return t(+ "settings.members.tooltip.cannot-change-role-of-systembot-or-service-account"+ );}if (!hasRBACFeature.value) {diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex aad6c12e4d..4f9aed3718 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -455,7 +455,7 @@"not-allow-edit": "Only Owner can change the role","not-allow-remove": "Cannot remove the last Owner","project-role-provider-gitlab": "Mapped from the {rawRole} role in the corresponding GitLab project.",- "cannot-change-role-of-systembot": "Cannot change the role of system bot"+ "cannot-change-role-of-systembot-or-service-account": "Cannot change the role of system bot or service account"},"system-bot": "System Bot","service-account": "Service Account",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 1f925ca56a..7e8b3ed695 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -454,7 +454,7 @@"not-allow-edit": "Solo el propietario puede cambiar el rol","not-allow-remove": "No se puede eliminar el último propietario","project-role-provider-gitlab": "Mapeado desde el rol {rawRole} en el proyecto correspondiente de GitLab.",- "cannot-change-role-of-systembot": "No se puede cambiar el rol del bot del sistema"+ "cannot-change-role-of-systembot-or-service-account": "No se puede cambiar el rol de la cuenta bot del sistema o de la cuenta de servicio"},"system-bot": "Bot del Sistema","service-account": "Cuenta de Servicio",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex e27fe386e9..f8b5bae102 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -451,7 +451,7 @@"not-allow-edit": "只有所有者才能改变角色","not-allow-remove": "不能移除最后一个所有者","project-role-provider-gitlab": "同步自对应 GitLab 项目的 {rawRole} 角色",- "cannot-change-role-of-systembot": "不能修改机器人助手的角色"+ "cannot-change-role-of-systembot-or-service-account": "不能修改机器人助手和服务账号的角色"},"system-bot": "机器人助手","service-account": "服务账号",