public string SortGrid(int newIndex, int oldIndex, int id) { bool hasPermissions = sectionRpstry.GetPermission(sectionName, loggedUser.UserId, canSort); if (hasPermissions) { return(rpstry.SortGrid(newIndex, oldIndex, id)); } else { return("You do not have permissions to access this section."); } }