[actions] homogen action/view selectors. Move action together with associated view to avoid such thing in the future cubicweb-version-3.9.1
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 12 Jul 2010 14:11:09 +0200
changeset 5963 4d75f743ed49
parent 5962 3f27004ca98c
child 5964 9bd75af3dca3
[actions] homogen action/view selectors. Move action together with associated view to avoid such thing in the future
web/views/actions.py
web/views/debug.py
--- a/web/views/actions.py	Mon Jul 12 13:28:02 2010 +0200
+++ b/web/views/actions.py	Mon Jul 12 14:11:09 2010 +0200
@@ -399,12 +399,6 @@
     title = _('manage')
     order = 20
 
-class SiteInfoAction(ManagersAction):
-    __regid__ = 'siteinfo'
-    __select__ = match_user_groups('users','managers')
-    title = _('info')
-    order = 30
-
 
 # footer actions ###############################################################
 
--- a/web/views/debug.py	Mon Jul 12 13:28:02 2010 +0200
+++ b/web/views/debug.py	Mon Jul 12 14:11:09 2010 +0200
@@ -25,6 +25,7 @@
 
 from cubicweb.selectors import none_rset, match_user_groups
 from cubicweb.view import StartupView
+from cubicweb.web.views import actions
 
 def dict_to_html(w, dict):
     # XHTML doesn't allow emtpy <ul> nodes
@@ -37,10 +38,17 @@
 
 
 
+class SiteInfoAction(actions.ManagersAction):
+    __regid__ = 'siteinfo'
+    __select__ = match_user_groups('users','managers')
+    title = _('info')
+    order = 30
+
+
 class ProcessInformationView(StartupView):
     """display various web server /repository information"""
     __regid__ = 'info'
-    __select__ = none_rset() & match_user_groups('managers')
+    __select__ = none_rset() & match_user_groups('managers', 'users')
 
     title = _('server information')
     cache_max_age = 0