Joseph Silber

Results 62 comments of Joseph Silber

You other option would be to have a special role for the restrictions, and assign that to all users who are only `user`s.

Bouncer lets you [grant abilities to everyone](https://github.com/JosephSilber/bouncer/blob/6228cbbe68761b61cf6f16e628f5a1cec52457b0/tests/BouncerSimpleTest.php#L46-L68), without using any roles: ```php Bouncer::allowEveryone()->to('view', Document::class); ``` I see now that it's not documented. Gotta fix that. --- So in your case,...

Yeah. That's a problem. It's actually a problem with any lazy object. Laravel is full of those. I've been thinking of maybe adding a `save` method, which would allow you...

Can you provide more information? 1. What are you trying to do? 2. How are you currently trying to do it? 3. What would you expect the outcome to be?...

Why would you want the record in `roles_assigned` to be updated instead of simply being replaced? What difference does it make?

As you've already discovered, this is not a question unique to Bouncer. It's a general question about Laravel's `Gate`. You can register your own `Gate` in the `Container`, overriding [the...

If you register your own gate before `Bouncer` is instantiated, then no.

Hmmm. This actually sounds like something that should be supported out-of-the-box. Let me think about it a little.

Just thinking what the API should look like. Probably something like: ```php Bouncer::scope()->to($tenantId)->onlyAbilities(); ```

1. The first question to ask is whether cache is indeed enabled. Can you check to make sure that Bouncer is not hitting the DB for every check? 2. The...