myth-auth icon indicating copy to clipboard operation
myth-auth copied to clipboard

Bug: Group Permissions and User cache

Open MGatner opened this issue 2 years ago • 4 comments

User permissions cache is not updated when Group permissions are altered, creating a potential lag time between adding/removing a group permission and the update to the user.

MGatner avatar Jul 12 '22 16:07 MGatner

I also encountered a problem like this, how to fix it? Any references to problems like this ?

rivaldysaputraagus avatar Sep 09 '22 09:09 rivaldysaputraagus

I also encountered a problem like this, how to fix it? Any references to problems like this ?

There are three methods in GroupModel.php file which alter group permissions. They are addPermissionToGroup(), removePermissionFromGroup() and removePermissionFromAllGroups(). So after group permissions altered you should retrieve users which belong to that group and delete there user permisssions cache files.

manageruz avatar Oct 28 '22 06:10 manageruz

Next time when there will be a call to get user's permissions, new data will be retrieved from database and saved to cache.

manageruz avatar Oct 28 '22 06:10 manageruz