web/views/startup.py
branchreldefsecurity
changeset 3877 7ca53fc72a0a
parent 3689 deb13e88e037
child 3890 d7a270f50f54
--- a/web/views/startup.py	Wed Nov 18 09:16:38 2009 +0100
+++ b/web/views/startup.py	Thu Nov 19 12:55:47 2009 +0100
@@ -26,6 +26,8 @@
     @classmethod
     def vreg_initialization_completed(cls):
         for eschema in cls.schema.entities():
+            if eschema.final:
+                continue
             if eschema.schema_entity():
                 uicfg.indexview_etype_section.setdefault(eschema, 'schema')
             elif eschema.is_subobject(strict=True):
@@ -140,8 +142,7 @@
         """
         req = self.req
         for eschema in eschemas:
-            if eschema.final or (not eschema.has_perm(req, 'read') and
-                                      not eschema.has_local_role('read')):
+            if eschema.final or not eschema.may_have_permission('read', req):
                 continue
             etype = eschema.type
             label = display_name(req, etype, 'plural')