##// END OF EJS Templates
permissions: flush default user permissions on global app permission changes.
marcink -
r3384:e6231c06 default
parent child Browse files
Show More
@@ -32,7 +32,7 b' from pyramid.response import Response'
32 32
33 33 from rhodecode.apps._base import BaseAppView, DataGridAppView
34 34 from rhodecode.apps.ssh_support import SshKeyFileChangeEvent
35 from rhodecode.events import trigger
35 from rhodecode import events
36 36
37 37 from rhodecode.lib import helpers as h
38 38 from rhodecode.lib.auth import (
@@ -141,6 +141,9 b' class AdminPermissionsView(BaseAppView, '
141 141 h.flash(_('Error occurred during update of permissions'),
142 142 category='error')
143 143
144 affected_user_ids = [User.get_default_user().user_id]
145 events.trigger(events.UserPermissionsChange(affected_user_ids))
146
144 147 raise HTTPFound(h.route_path('admin_permissions_application'))
145 148
146 149 @LoginRequired()
@@ -214,6 +217,9 b' class AdminPermissionsView(BaseAppView, '
214 217 h.flash(_('Error occurred during update of permissions'),
215 218 category='error')
216 219
220 affected_user_ids = [User.get_default_user().user_id]
221 events.trigger(events.UserPermissionsChange(affected_user_ids))
222
217 223 raise HTTPFound(h.route_path('admin_permissions_object'))
218 224
219 225 @LoginRequired()
@@ -313,6 +319,9 b' class AdminPermissionsView(BaseAppView, '
313 319 h.flash(_('Error occurred during update of permissions'),
314 320 category='error')
315 321
322 affected_user_ids = [User.get_default_user().user_id]
323 events.trigger(events.UserPermissionsChange(affected_user_ids))
324
316 325 raise HTTPFound(h.route_path('admin_permissions_global'))
317 326
318 327 @LoginRequired()
@@ -499,7 +508,7 b' class AdminPermissionsView(BaseAppView, '
499 508 key_file = self.request.registry.settings.get(
500 509 'ssh.authorized_keys_file_path')
501 510 if ssh_enabled:
502 trigger(SshKeyFileChangeEvent(), self.request.registry)
511 events.trigger(SshKeyFileChangeEvent(), self.request.registry)
503 512 h.flash(_('Updated SSH keys file: {}').format(key_file),
504 513 category='success')
505 514 else:
General Comments 0
You need to be logged in to leave comments. Login now