Ejemplo n.º 1
0
 def get_role_permission_edit_webpart(self,roleid):
     role=SystemRoleService.get_role(roleid)
     temp_role=VM_SystemRole(role)
     all_custom_permissions=PermissionService.all_custom_permissions()
     permission_list_webpart=self.get_role_permission_controll(all_custom_permissions,roleid)
     pagefileds={"role":temp_role,'permission_list_webpart':permission_list_webpart}
     return self.get_webpart(pagefileds,AdminSystemRolePath.admin_system_role_edit_page)
Ejemplo n.º 2
0
 def get_permission_sub_navbar(self, request, sub_nav_action):
     permissions_count = len(PermissionService.all_custom_permissions())
     return self.get_sub_nav_bar(
         request,
         self.subpage_model,
         AdminPermissionPath.admin_permission_subnav,
         sub_nav_action=sub_nav_action,
         permissions_count=permissions_count)
Ejemplo n.º 3
0
 def get_permission_list_webpart(self):
     permissions = PermissionService.all_custom_permissions()
     permission_list_controll = self.get_permission_list_controll(
         permissions)
     pagefileds = {
         "permission_list_controll": permission_list_controll,
         "permissions": permissions
     }
     return self.get_webpart(
         pagefileds, AdminPermissionPath.admin_permission_list_webpart)
Ejemplo n.º 4
0
def role_permission_list(request, roleid):
    all_custom_permissions = PermissionService.all_custom_permissions()
    page_worker = AdminSystemRolePageWorker(request)
    result = page_worker.get_role_permission_controll(all_custom_permissions,
                                                      roleid)
    return HttpResponse(result)