Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: copy iam acl yaml from backend (#10057)

boojack722324c24abb
diff --git a/.gitignore b/.gitignore
index eb463dafeb..33c55567fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,5 @@ docs/sqlservice/swagger.json
frontend/public/monaco-workers/
frontend/src/types/sql-review.*.yaml
frontend/src/types/plan.yaml
+frontend/src/types/iam/acl.yaml
scripts/.air.toml
diff --git a/frontend/scripts/copy_config_files.sh b/frontend/scripts/copy_config_files.sh
index 6d867e1e1f..3ca4ea1dc3 100644
--- a/frontend/scripts/copy_config_files.sh
+++ b/frontend/scripts/copy_config_files.sh
@@ -1,3 +1,4 @@
#!/bin/sh
cp ../backend/plugin/advisor/config/* ./src/types/
-cp ../backend/enterprise/api/plan.yaml ./src/types/
\ No newline at end of file
+cp ../backend/enterprise/api/plan.yaml ./src/types/
+cp ../backend/component/iam/acl.yaml ./src/types/iam/
diff --git a/frontend/src/store/modules/role.ts b/frontend/src/store/modules/role.ts
index 1f5673243a..e7d5dbb201 100644
--- a/frontend/src/store/modules/role.ts
+++ b/frontend/src/store/modules/role.ts
@@ -9,8 +9,8 @@ export const useRoleStore = defineStore("role", () => {
const roleList = ref<Role[]>([]);
const fetchRoleList = async () => {
- const response = await roleServiceClient.listRoles({});
- roleList.value = response.roles;
+ const { roles } = await roleServiceClient.listRoles({});
+ roleList.value = roles;
return roleList.value;
};
diff --git a/frontend/src/types/iam/index.ts b/frontend/src/types/iam/index.ts
new file mode 100644
index 0000000000..6214c8dcb0
--- /dev/null
+++ b/frontend/src/types/iam/index.ts
@@ -0,0 +1,8 @@
+import IAM_ACL_DATA from "./acl.yaml";
+
+interface Role {
+ name: string;
+ permissions: string[];
+}
+
+export const SYSTEM_ROLES: Role[] = IAM_ACL_DATA.roles;