Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void ConfigureAuth(IAppBuilder app, Autofac.IContainer container)
if (upn == null
|| !validUpns.Contains(upn, StringComparer.OrdinalIgnoreCase))
{
context.OwinContext.Response.Redirect("/Account/InvalidUser");
context.OwinContext.Response.Redirect("/Account/InvalidUser?upn=" + upn);
context.HandleResponse();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ public ActionResult SignOutCallback()
/// <summary>
/// Invalid User
/// </summary>
/// <param name="upn">upn of unauthorized user</param>
/// <returns>Action Result</returns>
public ActionResult InvalidUser()
public ActionResult InvalidUser(string upn)
{
this.ViewBag.Upn = upn;
this.HttpContext.GetOwinContext().Authentication.SignOut(CookieAuthenticationDefaults.AuthenticationType);
return this.View();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
ViewBag.Title = "Invalid User";
}
<h2>@ViewBag.Title.</h2>
<p class="text-danger">This user does not have the proper permissions for this action. Please sign in with a valid user credentials.</p>
<p class="text-danger">This user does not have the proper permissions for this action. Please sign in with a valid user credentials. In case you are still unable to access the app please ask the app administrator to add @ViewBag.Upn to the list of users allowed to configure this app</p>