We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20b68c7 commit 32e4538Copy full SHA for 32e4538
src/hooks/useAccessControl.ts
@@ -5,7 +5,7 @@ export const useAccessControl = (config: PluginConfig) => {
5
const user = useCurrentUser()
6
7
const hasConfigAccess =
8
- !config?.allowedRolesForConfiguration ||
+ !config?.allowedRolesForConfiguration?.length ||
9
user?.roles?.some((role) => config.allowedRolesForConfiguration.includes(role.name))
10
11
return {hasConfigAccess}
0 commit comments