public ActionResult ViewUser(string userId) { MxUser mxUser = GetMxUser(); if (mxUser.IsInRole("USERS_View")) { var model = new UsersModel(mxUser, userId.ToLower()); return View("Users", model); } else { return RedirectToAction("Login", "Account", new { returnUrl = "Admin/UserAdmin" }); } }
// // GET: /Account/Users public ActionResult Users() { MxUser mxUser = GetMxUser(); if (mxUser.IsInRole("USERS_View")) { var model = new UsersModel(mxUser, ""); // no user return View(model); } else { return RedirectToAction("Login", "Account", new { returnUrl = "Admin/UserAdmin" }); } }