diff --git a/src/composables/useAcl.js b/src/composables/useAcl.js index 46aaa3c25..be6dbc241 100644 --- a/src/composables/useAcl.js +++ b/src/composables/useAcl.js @@ -16,10 +16,11 @@ export function useAcl() { state.setAcls(acls); } - function hasAny(model, prop, accessType) { + function hasAny(model, props = [], accessType) { const acls = state.getAcls().value[model]; + Array.isArray(props) || (props = [props]); if (acls) - return ['*', prop].some((key) => { + return ['*', ...props].some((key) => { const acl = acls[key]; return acl && (acl['*'] || acl[accessType]); });