Show More
@@ -28,7 +28,7 b' log = logging.getLogger(__name__)' | |||||
28 |
|
28 | |||
29 | def trigger_user_permission_flush(event): |
|
29 | def trigger_user_permission_flush(event): | |
30 | """ |
|
30 | """ | |
31 | Subscriber to the `UserPermissionChange`. This triggers the |
|
31 | Subscriber to the `UserPermissionsChange`. This triggers the | |
32 | automatic flush of permission caches, so the users affected receive new permissions |
|
32 | automatic flush of permission caches, so the users affected receive new permissions | |
33 | Right Away |
|
33 | Right Away | |
34 | """ |
|
34 | """ |
@@ -28,6 +28,7 b' from pyramid.view import view_config' | |||||
28 | from pyramid.renderers import render |
|
28 | from pyramid.renderers import render | |
29 | from pyramid.response import Response |
|
29 | from pyramid.response import Response | |
30 |
|
30 | |||
|
31 | from rhodecode import events | |||
31 | from rhodecode.apps._base import RepoAppView, DataGridAppView |
|
32 | from rhodecode.apps._base import RepoAppView, DataGridAppView | |
32 | from rhodecode.lib.auth import ( |
|
33 | from rhodecode.lib.auth import ( | |
33 | LoginRequired, HasRepoPermissionAnyDecorator, NotAnonymous, |
|
34 | LoginRequired, HasRepoPermissionAnyDecorator, NotAnonymous, | |
@@ -253,6 +254,9 b' class RepoForksView(RepoAppView, DataGri' | |||||
253 | h.flash(msg, category='error') |
|
254 | h.flash(msg, category='error') | |
254 |
|
255 | |||
255 | repo_name = form_result.get('repo_name_full', self.db_repo_name) |
|
256 | repo_name = form_result.get('repo_name_full', self.db_repo_name) | |
|
257 | ||||
|
258 | events.trigger(events.UserPermissionsChange([self._rhodecode_user.user_id])) | |||
|
259 | ||||
256 | raise HTTPFound( |
|
260 | raise HTTPFound( | |
257 | h.route_path('repo_creating', |
|
261 | h.route_path('repo_creating', | |
258 | repo_name=repo_name, |
|
262 | repo_name=repo_name, |
General Comments 0
You need to be logged in to leave comments.
Login now