JosephSilber / bouncer

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

Teams Permissions #605

Open luchtech opened 1 year ago

luchtech commented 1 year ago

Both spatie/laravel-permissions and LaraTrust have their own optional implementation of Teams Permissions. Are there any plans or ongoing works to supplement the need for Teams-based abilities?

luchtech commented 1 year ago

Kudos to the very beautiful fluent methods! I am highly considering this as default for our projects but the team-based permission is what gives me hesitation. Hopefully, you have upcoming plans for that.

JosephSilber commented 1 year ago

Teams are basically the same concept as multi tenancy:

https://github.com/JosephSilber/bouncer/blob/master/readme.md#multi-tenancy

Set the team_id as the current scope, and any role/permission granted will be specific for that team. Same for checks: any checks at the gate will be specific to that team.