diff --git a/src/modules/system/users/UserDetail.vue b/src/modules/system/users/UserDetail.vue index 1c8d0654..905de6a6 100644 --- a/src/modules/system/users/UserDetail.vue +++ b/src/modules/system/users/UserDetail.vue @@ -1,10 +1,19 @@ @@ -40,11 +49,15 @@ const router = useRouter(); >
角色
- + - {{ user?.metadata?.name }} + {{ role }}
diff --git a/src/modules/system/users/UserList.vue b/src/modules/system/users/UserList.vue index 16886b17..b3ab4107 100644 --- a/src/modules/system/users/UserList.vue +++ b/src/modules/system/users/UserList.vue @@ -45,6 +45,13 @@ const handleOpenCreateModal = (user: User) => { creationModal.value = true; }; +const getRoles = (user: User) => { + return JSON.parse( + user.metadata.annotations?.["rbac.authorization.halo.run/role-names"] || + "[]" + ); +}; + onMounted(() => { handleFetchUsers(); }); @@ -254,9 +261,13 @@ onMounted(() => {
-