web/views/management.py
branchtls-sprint
changeset 1569 99a19875ef1e
parent 1568 08f25ed7a7f4
child 1641 2c80b09d8d86
equal deleted inserted replaced
1568:08f25ed7a7f4 1569:99a19875ef1e
    65 
    65 
    66 class SecurityManagementView(EntityView, SecurityViewMixIn):
    66 class SecurityManagementView(EntityView, SecurityViewMixIn):
    67     """display security information for a given entity"""
    67     """display security information for a given entity"""
    68     id = 'security'
    68     id = 'security'
    69     title = _('security')
    69     title = _('security')
       
    70     def call(self):
       
    71         self.w(u'<div id="progress">%s</div>' % self.req._('validating...'))
       
    72         super(SecurityManagementView, self).call()
    70 
    73 
    71     def cell_call(self, row, col):
    74     def cell_call(self, row, col):
    72         self.req.add_js('cubicweb.edition.js')
    75         self.req.add_js('cubicweb.edition.js')
    73         self.req.add_css('cubicweb.acl.css')
    76         self.req.add_css('cubicweb.acl.css')
    74         entity = self.entity(row, col)
    77         entity = self.entity(row, col)
    80              html_escape(entity.dc_title())))
    83              html_escape(entity.dc_title())))
    81         # first show permissions defined by the schema
    84         # first show permissions defined by the schema
    82         self.w('<h2>%s</h2>' % _('schema\'s permissions definitions'))
    85         self.w('<h2>%s</h2>' % _('schema\'s permissions definitions'))
    83         self.schema_definition(entity.e_schema)
    86         self.schema_definition(entity.e_schema)
    84         self.w('<h2>%s</h2>' % _('manage security'))
    87         self.w('<h2>%s</h2>' % _('manage security'))
    85         self.w(u'<div id="progress">%s</div>' % self.req._('validating...'))
       
    86         # ownership information
    88         # ownership information
    87         if self.schema.rschema('owned_by').has_perm(self.req, 'add',
    89         if self.schema.rschema('owned_by').has_perm(self.req, 'add',
    88                                                     fromeid=entity.eid):
    90                                                     fromeid=entity.eid):
    89             self.owned_by_edit_form(entity)
    91             self.owned_by_edit_form(entity)
    90         else:
    92         else: