changeset 1705:6cd9347f7cc5

Admin menu hidded for non-admin users
author Jaiditya Mathur <jaiditya.mathur@gmail.com>
date Fri, 17 Aug 2012 03:26:05 +0530
parents 067a8a0ed22a
children 78a484e1d555 7b7ec9dccf34
files MoinMoin/apps/admin/views.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/views.py	Thu Aug 16 23:34:25 2012 +0530
+++ b/MoinMoin/apps/admin/views.py	Fri Aug 17 03:26:05 2012 +0530
@@ -26,6 +26,7 @@
 from MoinMoin.security import require_permission
 
 @admin.route('/superuser')
+@require_permission(SUPERUSER)
 def index():
     return render_template('admin/index.html', title_name=_(u"Admin"))
 
@@ -35,7 +36,6 @@
 
 
 @admin.route('/userbrowser')
-@require_permission(SUPERUSER)
 def userbrowser():
     """
     User Account Browser
@@ -53,7 +53,6 @@
 
 
 @admin.route('/userprofile/<user_name>', methods=['GET', 'POST', ])
-@require_permission(SUPERUSER)
 def userprofile(user_name):
     """
     Set values in user profile
@@ -120,7 +119,6 @@
 from MoinMoin.config import default as defaultconfig
 
 @admin.route('/wikiconfig', methods=['GET', ])
-@require_permission(SUPERUSER)
 def wikiconfig():
     settings = {}
     for groupname in defaultconfig.options:
@@ -165,7 +163,6 @@
 
 
 @admin.route('/wikiconfighelp', methods=['GET', ])
-@require_permission(SUPERUSER)
 def wikiconfighelp():
     def format_default(default):
         if isinstance(default, defaultconfig.DefaultExpression):