mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 23:29:33 +00:00
Update packages/plugins/users-permissions/server/strategies/users-permissions.js
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
This commit is contained in:
parent
3ac3c5eef2
commit
d3a0b225a6
@ -84,7 +84,8 @@ const verify = async (auth, config) => {
|
|||||||
where: { role: user ? user.role.id : { type: 'public' } },
|
where: { role: user ? user.role.id : { type: 'public' } },
|
||||||
});
|
});
|
||||||
|
|
||||||
allowedActions = auth.allowedActions = map('action', permissions);
|
allowedActions = map('action', permissions);
|
||||||
|
auth.allowedActions = allowedActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isAllowed = castArray(config.scope).every(scope => allowedActions.includes(scope));
|
const isAllowed = castArray(config.scope).every(scope => allowedActions.includes(scope));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user