##// END OF EJS Templates
permissions: Fix permissions for authentication plugin settings view.
Martin Bornhold -
r173:b542bf08 stable
parent child Browse files
Show More
@@ -44,7 +44,10 b' class AuthnPluginViewBase(object):'
44 self.request = request
44 self.request = request
45 self.context = context
45 self.context = context
46 self.plugin = context.plugin
46 self.plugin = context.plugin
47 self._rhodecode_user = request.user
47
48
49 @LoginRequired()
50 @HasPermissionAllDecorator('hg.admin')
48 def settings_get(self, defaults=None, errors=None):
51 def settings_get(self, defaults=None, errors=None):
49 """
52 """
50 View that displays the plugin settings as a form.
53 View that displays the plugin settings as a form.
@@ -67,6 +70,9 b' class AuthnPluginViewBase(object):'
67
70
68 return template_context
71 return template_context
69
72
73 @LoginRequired()
74 @HasPermissionAllDecorator('hg.admin')
75 @auth.CSRFRequired()
70 def settings_post(self):
76 def settings_post(self):
71 """
77 """
72 View that validates and stores the plugin settings.
78 View that validates and stores the plugin settings.
@@ -208,6 +208,8 b' class LoginView(object):'
208 })
208 })
209 return render_ctx
209 return render_ctx
210
210
211 @HasPermissionAnyDecorator(
212 'hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')
211 @view_config(
213 @view_config(
212 route_name='register', request_method='POST',
214 route_name='register', request_method='POST',
213 renderer='rhodecode:templates/register.html')
215 renderer='rhodecode:templates/register.html')
General Comments 0
You need to be logged in to leave comments. Login now