public async Task <IHttpActionResult> Members(long labId) { var(_, isLabManager) = await GetLab(labId); return(JsonWithPermissions(new { Results = await LabsDao.ListMembers(this, labId) }, isLabManager, isLabManager, isLabManager)); }
public async Task <ActionResult> Members(Lab lab) { var userId = HttpContext.User.Identity.GetUserId(); var members = await LabsDao.ListMembers(this, lab.LabId); var model = new LabsMembersViewModel { Lab = lab, Members = members, IsLabManager = lab.UserIsLabManager(userId) }; return(View(model)); }