fix: make SUPER_ADMIN role checks case-insensitive across app
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
@ -114,6 +114,10 @@ export const useUserStore = defineStore('user', () => {
|
||||
|
||||
// 判断当前用户是否拥有某个权限(菜单或元素)
|
||||
const hasPermission = (code: string) => {
|
||||
// 超级管理员拥有所有权限
|
||||
if (role.value && role.value.toUpperCase() === 'SUPER_ADMIN') {
|
||||
return true
|
||||
}
|
||||
return permissions.value.includes(code)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user