Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can helper returning true after removing role from the user #634

Open
justasSendrauskas opened this issue Jul 20, 2023 · 2 comments
Open

Comments

@justasSendrauskas
Copy link

using Bouncer v1.0.1
In unit tests i have:

allow('some-admin')->to('manage', Some::class);
Bouncer::dontCache();

$user->assign('some-admin');
Bouncer::refresh();

$user->isA('some-admin'); // returns true
$user->can('manage', Some::class); // returns true

$user->retract('some-admin');
Bouncer::refresh();

$user->isA('some-admin'); // returns false
$user->can('manage', Some::class); // returns true where it should be false

not using any scopes

@JosephSilber
Copy link
Owner

That doesn't sound right. Testing it myself, I can't reproduce it. Could you maybe make a small repository demonstrating this issue?

@justasSendrauskas
Copy link
Author

thank you for getting back so promptly, did not expect that.

It leads me thinking it might be some configuration, will investigate/create repo, and report back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants