JosephSilber / bouncer

Laravel Eloquent roles and abilities.
MIT License
3.43k stars 330 forks source link

Batch allow/disallow #615

Open robertoperez-digital opened 1 year ago

robertoperez-digital commented 1 year ago

Is there a way to mass allow or disallow some ability to an array of users? like

Bouncer::allow($users)->to('ability', $object)
Bouncer:: disallow($users)->to('ability', $object)
lrljoe commented 1 year ago

You can do this with a role, assign the ability to the role, and you can batch assign users to the role.