public IActionResult GetUserRightsList(DataSourceRequest request, int RoleId)
 {
     if (RoleId != 0)
     {
         List <UserRightsModel> list = CustomRepository.GetUserRightsList(RoleId).ToList();
         return(Json(list.ToDataSourceResult(request)));
     }
     return(Json(new List <UserRightsModel>().ToDataSourceResult(request)));
 }