瀏覽代碼

管理员拥有所有权限

CzRger 1 周之前
父節點
當前提交
58491bf9cc
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/stores/modules/app.ts

+ 2 - 1
src/stores/modules/app.ts

@@ -17,7 +17,8 @@ export const useAppStore = defineStore('app', {
   getters: {
     isSuperAdmin() {
       return (
-        this.userInfo?.loginId === (import.meta as any).env.VITE_SUPER_ADMIN
+        this.userInfo?.loginId === (import.meta as any).env.VITE_SUPER_ADMIN ||
+        this.userInfo?.type == 0
       )
     },
   },