[actions] homogen action/view selectors. Move action together with associated view to avoid such thing in the future
--- 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