Joseph Silber
Joseph Silber
You have to first tell Bouncer that users may own leads: ```php Bouncer::allowEveryone()->toOwn(Lead::class); ```
- > Each ability check sets a new key in cache for every single user Of course it does! How else could it be stored? It's obviously user-dependent, so it...
The `ownedVia` method simply sets up the logic. You still must tell Bouncer that a profile is allowed to own an application. --- **Update**: the code here is incorrect. See...
> maybe a good idea to also include this in the documentation? This has been documented since the beginning: https://github.com/JosephSilber/bouncer#allowing-a-user-or-role-to-own-a-model
That should definitely work. Can you create a small isolated reproduction repo?
I see this in your seeder class: ```php Bouncer::ability()->firstOrCreate([ 'name' => 'view', 'title' => 'View' ]); Bouncer::ability()->firstOrCreate([ 'name' => 'create', 'title' => 'Create' ]); Bouncer::ability()->firstOrCreate([ 'name' => 'update', 'title' =>...
Sorry for not having an answer yet. It's summer. I checked it out locally and started playing with it, but didn't have time to fully dig in yet. Just checking...
~Hmm. That doesn't seem right. Will investigate.~ If you want to help, could you create a repository with a minimal reproduction? --- I misread before. This is the way Bouncer...
This is a feature request that keeps on coming up, but it's more complicated than it sounds. Caching becomes really complicated. [See here](https://josephsilber.com/posts/2022/05/17/releasing-bouncer-laravel-roles-and-permissions#working-up-to-the-release). --- In your case, you could use...
You're not doing anything wrong. Roles are simply a shortcut for providing permissions to a given user. So for all roles that they have, if any of them forbids an...