web/views/actions.py
branchtls-sprint
changeset 1398 5fe84a5f7035
parent 1263 01152fffd593
child 1452 546b9884d92c
equal deleted inserted replaced
1397:6cbc7bc8ea6d 1398:5fe84a5f7035
   160     def registered(cls, vreg):
   160     def registered(cls, vreg):
   161         super(ManagePermissionsAction, cls).registered(vreg)
   161         super(ManagePermissionsAction, cls).registered(vreg)
   162         if 'require_permission' in vreg.schema:
   162         if 'require_permission' in vreg.schema:
   163             cls.__select__ = (one_line_rset() & non_final_entity() &
   163             cls.__select__ = (one_line_rset() & non_final_entity() &
   164                               (match_user_groups('managers')
   164                               (match_user_groups('managers')
   165                                | relation_possible('require_permission', 'subject', 'EPermission',
   165                                | relation_possible('require_permission', 'subject', 'CWPermission',
   166                                                    action='add')))
   166                                                    action='add')))
   167         return super(ManagePermissionsAction, cls).registered(vreg)
   167         return super(ManagePermissionsAction, cls).registered(vreg)
   168     
   168     
   169     def url(self):
   169     def url(self):
   170         return self.rset.get_entity(0, 0).absolute_url(vid='security')
   170         return self.rset.get_entity(0, 0).absolute_url(vid='security')