How can I extend manage ability to include another rule?
Anything like this:
Ability.addAlias("manage", ["list"]);
or
Ability.addAlias("manage", ["list", "manage"]);
You can create custom alias with name access:
Ability.addAlias("access", ["list", "manage"])
Another approach is to extend what is inside manage (read, create, update, delete)
Ability.addAlias('read', ['list'])
// later when you define rules
const abiltiy = AbilityBuilder.define(can => {
can('read', 'Product')
})
ability.can('list', 'Product') // true
ability.can('read', 'Product') // true
Thank you sir! I'm implementing the first option right now
Thanks for using CASL! I'm closing this as there are no action items anymore