public async Task <IActionResult> Sub(string id) { var model = new HomeSubViewModel(); if (_load.CheckLock(id)) { if (User.Identity.Name != null) { var access = _load.GetFA(id, User.Identity.Name); var authorizationResult = await _authorizationService.AuthorizeAsync(User, access, new EditRequirements()); if (authorizationResult.Succeeded) { model.Posts = _load.GetPosts(id); model.FId = model.Posts.FirstOrDefault(); return(View(model)); } var reqForum = _load.GetForum(id); return(RedirectToAction("RequestAccess", reqForum)); } return(View("AccessDenied")); } model.Posts = _load.GetPosts(id); model.FId = model.Posts.FirstOrDefault(); return(View(model)); }
public IActionResult RemoveForum(string id) { var model = _load.GetForum(id); return(View(model)); }