web/views/startup.py
branchreldefsecurity
changeset 3877 7ca53fc72a0a
parent 3689 deb13e88e037
child 3890 d7a270f50f54
equal deleted inserted replaced
3876:1169d3154be6 3877:7ca53fc72a0a
    24     add_etype_links = ()
    24     add_etype_links = ()
    25 
    25 
    26     @classmethod
    26     @classmethod
    27     def vreg_initialization_completed(cls):
    27     def vreg_initialization_completed(cls):
    28         for eschema in cls.schema.entities():
    28         for eschema in cls.schema.entities():
       
    29             if eschema.final:
       
    30                 continue
    29             if eschema.schema_entity():
    31             if eschema.schema_entity():
    30                 uicfg.indexview_etype_section.setdefault(eschema, 'schema')
    32                 uicfg.indexview_etype_section.setdefault(eschema, 'schema')
    31             elif eschema.is_subobject(strict=True):
    33             elif eschema.is_subobject(strict=True):
    32                 uicfg.indexview_etype_section.setdefault(eschema, 'subobject')
    34                 uicfg.indexview_etype_section.setdefault(eschema, 'subobject')
    33             else:
    35             else:
   138         """return a list of formatted links to get a list of entities of
   140         """return a list of formatted links to get a list of entities of
   139         a each entity's types
   141         a each entity's types
   140         """
   142         """
   141         req = self.req
   143         req = self.req
   142         for eschema in eschemas:
   144         for eschema in eschemas:
   143             if eschema.final or (not eschema.has_perm(req, 'read') and
   145             if eschema.final or not eschema.may_have_permission('read', req):
   144                                       not eschema.has_local_role('read')):
       
   145                 continue
   146                 continue
   146             etype = eschema.type
   147             etype = eschema.type
   147             label = display_name(req, etype, 'plural')
   148             label = display_name(req, etype, 'plural')
   148             nb = req.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0]
   149             nb = req.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0]
   149             url = self.build_url(etype)
   150             url = self.build_url(etype)