Преглед изворни кода

管理员拥有所有权限

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
       )
     },
   },