示例#1
0
        public async Task <IHttpActionResult> Members(long labId)
        {
            var(_, isLabManager) = await GetLab(labId);

            return(JsonWithPermissions(new
            {
                Results = await LabsDao.ListMembers(this, labId)
            }, isLabManager, isLabManager, isLabManager));
        }
示例#2
0
        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));
        }