JosephSilber / bouncer

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

Reset scope when create new bouncer instance #650

Open comhon-project opened 2 months ago

comhon-project commented 2 months ago

Hello team!

the Scope is persistent between several application initialization (typically during tests). the scope is defined as a static value in Silber\Bouncer\Database\Models and is not reset when bouncer service is initialized. Due to this, the scope is not reset between tests.

So the solution that I propose is to reset scope when create new bouncer instance

linked to issue 643

comhon-project commented 1 month ago

@JosephSilber is this repository still maintained ? if yes, Do you have any comments on my pull request?