- Affected version
- 2.2
This is based on anecdotal experiences and not something I can reliably reproduce, but it's happened enough that I believe there's an issue somewhere.
It seems that when there is a large number of permission combinations, they do not always get rebuilt to reflect permisison changes.
On two forums, one with just over 1000 total combinations and another with over 4300, there have been several instances where a permission doesn't seem to have been applied - the permission is set to Yes, but the change isn't reflected on the front end (i.e. a user can't access/see the thing they should with that permission).
Using the Analyze Permissions tool in the ACP, the result for the given permission is Yes - and yet if I dump out
The way I've then fixed it is just re-saving the permissions. Usually I've done this by setting it to Yes as a user permission, then setting it back to No/Inherit. Theoretically this means nothing has changed from what it was before. However, when I then refresh the front end, that same check for
I'll try and do a deeper debugging dive when I can, but just wanted to make this report as somewhere to dump any findings, and see if anyone else has experienced this.
It seems that when there is a large number of permission combinations, they do not always get rebuilt to reflect permisison changes.
On two forums, one with just over 1000 total combinations and another with over 4300, there have been several instances where a permission doesn't seem to have been applied - the permission is set to Yes, but the change isn't reflected on the front end (i.e. a user can't access/see the thing they should with that permission).
Using the Analyze Permissions tool in the ACP, the result for the given permission is Yes - and yet if I dump out
$visitor->hasPermission('permissionName'), it returns false. It's always definitely the correct user/entity/permission etc. The analyzer says Yes, the front end says No.The way I've then fixed it is just re-saving the permissions. Usually I've done this by setting it to Yes as a user permission, then setting it back to No/Inherit. Theoretically this means nothing has changed from what it was before. However, when I then refresh the front end, that same check for
$visitor->hasPermission('permissionName') now returns true. The actual values set are the same as they were, but it seems like a cached combination didn't get rebuilt the first time. There's no other way to explain how the front end dump would go from returning false to true.I'll try and do a deeper debugging dive when I can, but just wanted to make this report as somewhere to dump any findings, and see if anyone else has experienced this.
Last edited: