public async Task <ActionResult> Delete(Guid id) { var user = await CharacterFacade.GetCharacterById(Guid.Parse(User.Identity.Name)); if (user != null && user.IsGroupAdmin && user.GroupId == id) { await GroupFacade.RemoveGroup(id); return(RedirectToAction("List")); } return(RedirectToAction("NotAuthorized", "Error")); }
public async Task <ActionResult> Delete(Guid id) { await GroupFacade.RemoveGroup(id); return(RedirectToAction("List", new { area = "Admin" })); }