@povio/openapi-codegen-cli 2.0.8-rc.22 → 2.0.8-rc.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acl.mjs +2 -2
- package/dist/sh.mjs +1 -1
- package/package.json +1 -1
package/dist/acl.mjs
CHANGED
|
@@ -65,8 +65,8 @@ const Can = ({ use, ...props }) => {
|
|
|
65
65
|
function useAclCheck({ errorHandler } = {}) {
|
|
66
66
|
const ability = AbilityContext.useAbility();
|
|
67
67
|
return { checkAcl: useCallback((appAbility) => {
|
|
68
|
-
const
|
|
69
|
-
if (!can(
|
|
68
|
+
const [action, subject] = appAbility;
|
|
69
|
+
if (!ability.can(action, subject)) (errorHandler ?? SharedErrorHandler).rethrowError(/* @__PURE__ */ new Error("ACL check failed"));
|
|
70
70
|
}, [ability, errorHandler]) };
|
|
71
71
|
}
|
|
72
72
|
|
package/dist/sh.mjs
CHANGED