permissions: flush cache when creating a new fork.
This commit is contained in:
parent
239874ceca
commit
fa5d94d619
2 changed files with 5 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
def trigger_user_permission_flush(event):
|
||||
"""
|
||||
Subscriber to the `UserPermissionChange`. This triggers the
|
||||
Subscriber to the `UserPermissionsChange`. This triggers the
|
||||
automatic flush of permission caches, so the users affected receive new permissions
|
||||
Right Away
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ from pyramid.view import view_config
|
|||
from pyramid.renderers import render
|
||||
from pyramid.response import Response
|
||||
|
||||
from rhodecode import events
|
||||
from rhodecode.apps._base import RepoAppView, DataGridAppView
|
||||
from rhodecode.lib.auth import (
|
||||
LoginRequired, HasRepoPermissionAnyDecorator, NotAnonymous,
|
||||
|
|
@ -253,6 +254,9 @@ class RepoForksView(RepoAppView, DataGridAppView):
|
|||
h.flash(msg, category='error')
|
||||
|
||||
repo_name = form_result.get('repo_name_full', self.db_repo_name)
|
||||
|
||||
events.trigger(events.UserPermissionsChange([self._rhodecode_user.user_id]))
|
||||
|
||||
raise HTTPFound(
|
||||
h.route_path('repo_creating',
|
||||
repo_name=repo_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue