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: fix role type checks (#10471)
boojack27928aa23d30
diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vueindex 939fdfb856..441a6d6e49 100644--- a/frontend/src/components/Role/Setting/components/RolePanel.vue+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue@@ -53,7 +53,7 @@<span class="ml-0.5 text-error">*</span></div><div>- <span class="textinfolabel mr-2">{{ $t("common.type") }}</span>+ <span class="textinfolabel mr-2">{{ $t("common.type") }}:</span><NRadio:checked="state.permissionType === 'WORKSPACE'"value="WORKSPACE"diff --git a/frontend/src/utils/iam/role.ts b/frontend/src/utils/iam/role.tsindex fc1edb0721..d52a19b90b 100644--- a/frontend/src/utils/iam/role.ts+++ b/frontend/src/utils/iam/role.ts@@ -7,19 +7,15 @@ import {} from "@/types";export const isWorkspaceLevelRole = (role: string) => {- const roleStore = useRoleStore();- return (- WorkspaceLevelRoles.includes(role) &&- roleStore- .getRoleByName(role)- ?.permissions.every((permission) =>- WORKSPACE_PERMISSIONS.includes(permission as WorkspacePermission)- )- );+ return useRoleStore()+ .getRoleByName(role)+ ?.permissions.every((permission) =>+ WORKSPACE_PERMISSIONS.includes(permission as WorkspacePermission)+ );};export const isProjectLevelRole = (role: string) => {- return ProjectLevelRoles.includes(role) || !isWorkspaceLevelRole(role);+ return !isWorkspaceLevelRole(role);};export const isCustomRole = (role: string) => {