# HG changeset patch # User Daniel Dourvaris # Date 2020-01-10 14:56:21 # Node ID 11fc38a7a30cfa860644e105f7c173053c030013 # Parent 0268c0ee7ea664d172a3166364f6b9d6431f450d repo-permission: properly flush caches on set private mode. diff --git a/rhodecode/apps/repository/views/repo_permissions.py b/rhodecode/apps/repository/views/repo_permissions.py --- a/rhodecode/apps/repository/views/repo_permissions.py +++ b/rhodecode/apps/repository/views/repo_permissions.py @@ -122,6 +122,10 @@ class RepoSettingsPermissionsView(RepoAp h.flash(_('Error occurred during update of repository {}').format( self.db_repo_name), category='error') + # NOTE(dan): we change repo private mode we need to notify all USERS + affected_user_ids = [x.user_id for x in User.get_all()] + PermissionModel().trigger_permission_flush(affected_user_ids) + return { 'redirect_url': h.route_path('edit_repo_perms', repo_name=self.db_repo_name), 'private': True