Added user logout method and unit tests to cover it

This commit is contained in:
tidusjar 2016-03-09 12:59:07 +00:00
commit 759540c837
4 changed files with 51 additions and 6 deletions

View file

@ -1,4 +1,6 @@
@using Nancy.Security
@using Nancy.Session
@using PlexRequests.UI.Models
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase
<html>
<head>
@ -42,13 +44,16 @@
<ul class="nav navbar-nav navbar-right">
@if (!Context.CurrentUser.IsAuthenticated())
{
<li><a href="/login">Login</a></li>
<li><a href="/login">Admin</a></li>
}
else
{
<li><a href="/logout">Logout</a></li>
<li><a href="/logout">Admin Logout</a></li>
}
@if (Context.Request.Session[SessionKeys.UsernameKey] != null)
{
<li><a href="/userlogin/logout">Logout</a></li>
}
</ul>
</div>
</div>