You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.
Hey, your lib looks not bad but we need own condition functions
functioncheckOwner(context){// ... own specifc logicreturnallowed;}ac.grant('user').condition(checkOwner).execute('update').on('posts');ac.can(user.roles).context({user, post, org}).execute('update').on('posts');
In a prefect world, the checkOwner function can be async to allow additional database lookups without the need to bind this logic on the context creation.
The text was updated successfully, but these errors were encountered:
Sorry for commenting closed issue but I also thought about this (async condition function) and came to the point that you don't really need it. Sure, more options are always nice but in my opinion all data that you need to make decision should be in context already. Load all data from database / do other async stuff on upper level, ACL shouldn't really do any IO.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey, your lib looks not bad but we need own condition functions
In a prefect world, the checkOwner function can be async to allow additional database lookups without the need to bind this logic on the context creation.
The text was updated successfully, but these errors were encountered: