def ready(self): super(PermissionsApp, self).ready() Role = self.get_model('Role') Group = apps.get_model(app_label='auth', model_name='Group') ModelPermission.register( model=Role, permissions=(permission_acl_edit, permission_acl_view, permission_permission_grant, permission_permission_revoke, permission_role_delete, permission_role_edit, permission_role_view)) menu_object.bind_links(links=(link_group_roles, ), position=98, sources=(Group, )) menu_object.bind_links(links=(link_role_edit, link_role_groups, link_role_permissions, link_acl_list, link_role_delete), sources=(Role, )) menu_multi_item.bind_links(links=(link_permission_grant, link_permission_revoke), sources=('permissions:role_permissions', )) menu_secondary.bind_links(links=(link_role_list, link_role_create), sources=(Role, 'permissions:role_create', 'permissions:role_list')) menu_setup.bind_links(links=(link_role_list, )) perform_upgrade.connect(purge_permissions, dispatch_uid='purge_permissions')
def ready(self): super(PermissionsApp, self).ready() Role = self.get_model('Role') APIEndPoint(app=self, version_string='1') menu_object.bind_links( links=( link_role_edit, link_role_members, link_role_permissions, link_role_delete ), sources=(Role,) ) menu_multi_item.bind_links( links=(link_permission_grant, link_permission_revoke), sources=('permissions:role_permissions',) ) menu_secondary.bind_links( links=(link_role_list, link_role_create), sources=(Role, 'permissions:role_create', 'permissions:role_list') ) menu_setup.bind_links(links=(link_role_list,)) perform_upgrade.connect( purge_permissions, dispatch_uid='purge_permissions' )
def ready(self): super(PermissionsApp, self).ready() APIEndPoint(app=self, version_string='1') menu_object.bind_links(links=(link_role_edit, link_role_members, link_role_permissions, link_role_delete), sources=(Role, )) menu_multi_item.bind_links(links=(link_permission_grant, link_permission_revoke), sources=('permissions:role_permissions', )) menu_secondary.bind_links(links=(link_role_list, link_role_create), sources=(Role, 'permissions:role_create', 'permissions:role_list')) menu_setup.bind_links(links=(link_role_list, )) perform_upgrade.connect(purge_permissions, dispatch_uid='purge_permissions')
def ready(self): super(PermissionsApp, self).ready() Role = self.get_model('Role') Group = apps.get_model(app_label='auth', model_name='Group') ModelPermission.register( model=Role, permissions=( permission_acl_edit, permission_acl_view, permission_permission_grant, permission_permission_revoke, permission_role_delete, permission_role_edit, permission_role_view ) ) menu_object.bind_links( links=(link_group_roles,), position=98, sources=(Group,) ) menu_object.bind_links( links=( link_role_edit, link_role_groups, link_role_permissions, link_acl_list, link_role_delete ), sources=(Role,) ) menu_multi_item.bind_links( links=(link_permission_grant, link_permission_revoke), sources=('permissions:role_permissions',) ) menu_secondary.bind_links( links=(link_role_list, link_role_create), sources=(Role, 'permissions:role_create', 'permissions:role_list') ) menu_setup.bind_links(links=(link_role_list,)) perform_upgrade.connect( purge_permissions, dispatch_uid='purge_permissions' )