Update access.ts

This commit is contained in:
Yifei Zhang 2023-04-10 10:57:16 +08:00 committed by GitHub
parent 3c1e81897a
commit 150735b001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ export const useAccessStore = create<AccessControlStore>()(
set((state) => ({ token }));
},
isAuthorized() {
return !!get().token || !!get().accessCode;
// has token or has code or disabled access control
return !!get().token || !!get().accessCode || !get().enabledAccessControl();
},
}),
{