Can helper returning true after removing role from the user
justasSendrauskas opened this issue · 2 comments
justasSendrauskas commented
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 commented
That doesn't sound right. Testing it myself, I can't reproduce it. Could you maybe make a small repository demonstrating this issue?
justasSendrauskas commented
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