--- a/web/views/startup.py Wed Apr 29 09:07:26 2009 +0200
+++ b/web/views/startup.py Wed Apr 29 09:27:03 2009 +0200
@@ -11,8 +11,8 @@
from logilab.mtconverter import html_escape
from cubicweb.common.uilib import ureport_as_html, ajax_replace_url
-from cubicweb.common.view import StartupView
-from cubicweb.common.selectors import match_user_group
+from cubicweb.view import StartupView
+from cubicweb.selectors import match_user_group
from cubicweb.web.httpcache import EtagHTTPCacheManager
from cubicweb.web.views.management import SecurityViewMixIn
from copy import deepcopy
@@ -189,11 +189,10 @@
self.wview(section, None)
self.w(u'</div>')
-
+
class ManagerSchemaPermissionsView(StartupView, SecurityViewMixIn):
id = 'schema_security'
- require_groups = ('managers',)
- __selectors__ = StartupView.__selectors__ + (match_user_group,)
+ __select__ = StartupView.__select__ & (match_user_group('managers')
def call(self, display_relations=True,
skiprels=('is', 'is_instance_of', 'identity', 'owned_by', 'created_by')):
@@ -209,7 +208,7 @@
entities = [eschema for eschema in entities
if not eschema.meta]
# compute relations
- relations = []
+ relations = []
if display_relations:
relations = [rschema for rschema in schema.relations()
if not (rschema.is_final() or rschema.type in skiprels)]
@@ -289,7 +288,7 @@
self.schema_definition(rschema, link=False)
self.w(u'</div>')
-
+
class SchemaUreportsView(StartupView):
id = 'schematext'