将超级管理员的角色code由admin改为super_admin

This commit is contained in:
ZG4vin committed 2024-10-24 17:48:35 +08:00
1 parent a31bafbb4a
commit 57ab876886
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ export function checkRole(value: string[]) {
if (value && value instanceof Array && value.length > 0) {
const { wsCache } = useCache()
const permissionRoles = value
const super_admin = 'admin'
const super_admin = 'super_admin'
const roles = wsCache.get(CACHE_KEY.USER).roles
const hasRole = roles.some((role) => {
return super_admin === role || permissionRoles.includes(role)