public Object[] getCustomerSatisfactionWidgetDetails(int accountId) { Object[] returnData = null; bool rights = authRepo.getAdminRights() || authRepo.getTeamLeadRights(accountId); bool b = authRepo.getAccountRights(accountId); Debug.WriteLine("CustomerSumAuth " + b + " " + authRepo.getAdminRights() + " " + authRepo.getTeamLeadRights(accountId)); if (rights) { returnData = repo.getCustomerSatisfactionWidgetDetails(accountId); } else if (b) { returnData = repo.getCustomerSatisfactionWidgetDetails(accountId); } return(returnData); }
public HttpResponseMessage getCustomerSatisfactionWidgetDetails(int accountId) { Object[] returnData = null; bool rights = authRepo.getAdminRights() || authRepo.getTeamLeadRights(accountId); bool b = authRepo.getAccountRights(accountId); Debug.WriteLine("CustomerSumAuth " + b + " " + authRepo.getAdminRights() + " " + authRepo.getTeamLeadRights(accountId)); if (authRepo.isAuthorized(accountId)) { returnData = repo.getCustomerSatisfactionWidgetDetails(accountId); return(Request.CreateResponse(HttpStatusCode.OK, returnData)); } else { return(Request.CreateResponse(HttpStatusCode.Forbidden)); } }