You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Login using different user in same computer after log out, menu list in side bar still cached.
Issue Description
Menu list not following by roles, cached on singleton causing unexpected result in menu list not following roles
Preconditions
Please provide as detailed information about your environment as possible.
1. V2.0.4
2. PHP 8.3
Steps to reproduce
It is important to provide a set of clear steps to reproduce this bug.If relevant please include code samples.
1. Create 2 user with different role with different menu access
2. Login with user one, see menu, then log out
3. Login with user two, see menu, and menu stuck with old role, sometimes work and can be retested, sometimes not.
Expected result
If want to use cache, use better caching strategy with proper way to cache
Bug report
Title
Login using different user in same computer after log out, menu list in side bar still cached.
Issue Description
Menu list not following by roles, cached on singleton causing unexpected result in menu list not following roles
Preconditions
Please provide as detailed information about your environment as possible.
Steps to reproduce
It is important to provide a set of clear steps to reproduce this bug.If relevant please include code samples.
Expected result
Actual result
Menu cached unexpectedly.
related code : https://github.com/krayin/laravel-crm/blob/master/packages/Webkul/Core/src/Menu.php#L53-L57
I don't think this is a good way to use static in the code, even it's in singleton in laravel or even with https://www.php.net/manual/en/language.oop5.static.php#118097 it' bad bad choices.
The text was updated successfully, but these errors were encountered: