fix(permissions): Invalidate cache on changing the default permissions

In case of change of global permissions the logic there can change the scope of permissions so much that we need to run a full permissions flush. This fixes #5700, and fixes #5701
This commit is contained in:
RhodeCode Admin 2023-11-06 11:08:04 +01:00
parent 5ba93a980e
commit 55a2a5ab18

View file

@ -517,6 +517,9 @@ class PermissionModel(BaseModel):
self.sa.rollback()
raise
# because we've FORCED and update here, make sure we reset all permissions cache
PermissionModel().trigger_permission_flush()
def update_branch_permissions(self, form_result):
if 'perm_user_id' in form_result:
perm_user = User.get(safe_int(form_result['perm_user_id']))