예제 #1
0
        //
        // GET: /Security/Permissions/1

        public virtual ActionResult Permissions(string id)
        {
            var employeeDetailsResult = _employeesService.GetEmployeeDetailsByKey(id);

            if (!employeeDetailsResult.Success)
            {
                ViewBag.Message = "Employee not found";
                MessengerService.SetMessage(MessageType.Informational, "Employee not found");
                return(RedirectToAction(MVC.Security.Index()));
            }

            var employeeDetails = employeeDetailsResult.ResultingObject;
            var model           = new MemberPermissions
            {
                EmployeeKey  = employeeDetails.EmployeeKey,
                EmployeeName = employeeDetails.DisplayName,
                Claims       = employeeDetails.Claims
            };

            return(View(model));
        }