Hidden field controller
in onInitDisposableCallbacks
and onInitCallbacks
.
CAuthorizer
methods executeInitOneTimeCallbacks
, addToInitOneTimeCallbacks
, removeFromInitOneTimeCallbacks
and field initOneTimeCallbacks
replaced with onInitDisposableCallbacks
field. The onInitDisposableCallbacks
field, is class that stored public methods for user to control callbacks
. Field onInitDisposableCallbacks
contains push
, remove
, set
and clear
methods. Use them instead of addToInitOneTimeCallbacks
/removeFromInitOneTimeCallbacks
methods.
The onInitDisposableCallbacks
works like initOneTimeCallbacks
.
onInitCallbacks
works like onInitDisposableCallbacks
, but onInitCallbacks
not clears after executing on init.
- Removed
useAuthorizerSafelyChecker
. - Updated
useAuthorizerCan
. - Updated
AuthorizerCan
,loadPermissions
.
Nothing changed
Added new method removeFromInitOneTimeCallbacks
that removes function which was added by addToInitOneTimeCallbacks
. Later example will be added, also it will be renamed.
Added new method filterByCan
that takes listRvals
and returns a filtered result where the can
method returned true
.
- Updated
react
example, updated hookuseAuthorizerCanListRvals
- Updated
vanilla
example, added example of usage methodfilterByCan
Now method can
of class CAuthorizer
changed accept only one argument, and this is array of request elements.
Before:
Authorizer.can("cat", "walk", "ground");
// OR
const rvals = ["cat", "walk", "ground"];
Authorizer.can(...rvals);
Now:
Authorizer.can(["cat", "walk", "ground"]);
- Updated
react
example, added new hook.