Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions Controllers/DockyardAccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
namespace HubWeb.Controllers
{
[DockyardAuthorize]
[RedirecLogedUser]
public class DockyardAccountController : Controller
{
private readonly Fr8Account _account;
Expand All @@ -34,6 +33,7 @@ public DockyardAccountController()
_planDirectory = ObjectFactory.GetInstance<PlanDirectoryService>();
}

[RedirecLogedUser]
[AllowAnonymous]
public ActionResult InterceptLogin(string returnUrl, string urlReferrer)
{
Expand All @@ -44,6 +44,7 @@ public ActionResult InterceptLogin(string returnUrl, string urlReferrer)
return View("Index");
}

[RedirecLogedUser]
[AllowAnonymous]
public ActionResult AccessDenied(string errorMessage)
{
Expand All @@ -52,20 +53,23 @@ public ActionResult AccessDenied(string errorMessage)
return View();
}

[RedirecLogedUser]
[AllowAnonymous]
public ActionResult Index(string returnUrl)
{
ViewBag.ReturnUrl = returnUrl;
return View();
}

[RedirecLogedUser]
[AllowAnonymous]
public ActionResult Register()
{
ViewBag.GuestUserEmail = TempData["tempEmail"];
return View();
}

[RedirecLogedUser]
[AllowAnonymous]
public ActionResult RegistrationSuccessful()
{
Expand All @@ -78,13 +82,15 @@ public async Task<ActionResult> LogOff()
this.Logout();
return RedirectToAction("Index");
}


[RedirecLogedUser]
[AllowAnonymous]
public ActionResult Confirm(RegistrationVM model)
{
return View(model);
}

[RedirecLogedUser]
[HttpPost]
[AllowAnonymous]
#if !DEBUG
Expand Down Expand Up @@ -149,6 +155,7 @@ public async Task<ActionResult> ProcessRegistration(RegistrationVM submittedRegD
return View("Register");
}

[RedirecLogedUser]
[HttpPost]
[AllowAnonymous]
#if !DEBUG
Expand Down Expand Up @@ -213,7 +220,7 @@ public async Task<ActionResult> Login(LoginVM model, string returnUrl)
return View("Index", model);
}


[RedirecLogedUser]
[HttpGet]
[AllowAnonymous]
public ActionResult ConfirmEmail(string userId, string code)
Expand All @@ -239,6 +246,7 @@ public ActionResult ConfirmEmail(string userId, string code)
return RedirectToAction("Index", "Welcome");
}

[RedirecLogedUser]
[System.Web.Http.HttpPost]
public ActionResult Edit(UserVM usersAdminVM)
{
Expand All @@ -265,13 +273,15 @@ public ActionResult Edit(UserVM usersAdminVM)
}
}

[RedirecLogedUser]
[HttpGet]
[AllowAnonymous]
public ActionResult ForgotPassword()
{
return View();
}

[RedirecLogedUser]
[HttpPost]
[AllowAnonymous]
public async Task<ActionResult> ForgotPassword(ForgotPasswordVM model)
Expand All @@ -295,6 +305,7 @@ public async Task<ActionResult> ForgotPassword(ForgotPasswordVM model)
return View(model);
}

[RedirecLogedUser]
[HttpGet]
[AllowAnonymous]
public ActionResult ResetPassword(string userId, string code)
Expand All @@ -314,6 +325,7 @@ public ActionResult ResetPassword(string userId, string code)
}
}

[RedirecLogedUser]
[HttpPost]
[AllowAnonymous]
public async Task<ActionResult> ResetPassword(ResetPasswordVM viewModel)
Expand Down Expand Up @@ -348,13 +360,15 @@ public async Task<ActionResult> ResetPassword(ResetPasswordVM viewModel)
return View(viewModel);
}

[RedirecLogedUser]
public RedirectToRouteResult RegisterGuestUser()
{
TempData["tempEmail"] = User.Identity.Name;
this.Logout();
return RedirectToAction("Register");
}

[RedirecLogedUser]
[AllowAnonymous]
public async Task<ActionResult> ProcessGuestUserMode()
{
Expand Down