mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix permission check issue
This commit is contained in:
parent
3fccbae676
commit
275cc70e96
@ -161,7 +161,7 @@ export const useAccounts = () => {
|
|||||||
export const useHasPermission = (perms?: string[]) => {
|
export const useHasPermission = (perms?: string[]) => {
|
||||||
const account = useAccount();
|
const account = useAccount();
|
||||||
|
|
||||||
if (!perms) return true;
|
if (!perms || !perms[0]) return true;
|
||||||
|
|
||||||
// TODO: Read permission of guest account here.
|
// TODO: Read permission of guest account here.
|
||||||
if (!account) return false;
|
if (!account) return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user