permissions: Fix permissions for authentication plugin settings view.
This commit is contained in:
parent
6841075a05
commit
3bd01810b3
2 changed files with 8 additions and 0 deletions
|
|
@ -44,7 +44,10 @@ class AuthnPluginViewBase(object):
|
|||
self.request = request
|
||||
self.context = context
|
||||
self.plugin = context.plugin
|
||||
self._rhodecode_user = request.user
|
||||
|
||||
@LoginRequired()
|
||||
@HasPermissionAllDecorator('hg.admin')
|
||||
def settings_get(self, defaults=None, errors=None):
|
||||
"""
|
||||
View that displays the plugin settings as a form.
|
||||
|
|
@ -67,6 +70,9 @@ class AuthnPluginViewBase(object):
|
|||
|
||||
return template_context
|
||||
|
||||
@LoginRequired()
|
||||
@HasPermissionAllDecorator('hg.admin')
|
||||
@auth.CSRFRequired()
|
||||
def settings_post(self):
|
||||
"""
|
||||
View that validates and stores the plugin settings.
|
||||
|
|
|
|||
|
|
@ -208,6 +208,8 @@ class LoginView(object):
|
|||
})
|
||||
return render_ctx
|
||||
|
||||
@HasPermissionAnyDecorator(
|
||||
'hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')
|
||||
@view_config(
|
||||
route_name='register', request_method='POST',
|
||||
renderer='rhodecode:templates/register.html')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue