Re-enable the Ntlm authentication tests
User.IsSignedIn() does not return true for NTLM. So pulling the NTLM check out of the code block.
This commit is contained in:
parent
1df35b8e8b
commit
7b8ace5489
|
|
@ -2,31 +2,28 @@
|
|||
|
||||
@if (User.IsSignedIn())
|
||||
{
|
||||
//Either NTLM will be used or social authentication will be used. Based on the authentication schemes enabled remove an unused block.
|
||||
if (User.Identity.AuthenticationType != "NTLM")
|
||||
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
|
||||
{
|
||||
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
@Html.ActionLink("Hello " + User.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||
</li>
|
||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//This code block necessary only for NTLM authentication
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<p class="nav navbar-text navbar-right">Hello, @User.GetUserName()!</p>
|
||||
@Html.ActionLink("Hello " + User.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||
</li>
|
||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
//Either NTLM will be used or social authentication will be used. Based on the authentication schemes enabled remove an unused block.
|
||||
else if (User.Identity.IsAuthenticated && User.Identity.AuthenticationType == "NTLM")
|
||||
{
|
||||
//This code block necessary only for NTLM authentication
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<p class="nav navbar-text navbar-right">Hello, @User.GetUserName()!</p>
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace E2ETests
|
|||
{
|
||||
public partial class SmokeTests
|
||||
{
|
||||
[ConditionalTheory(Skip = "Auth changes broke this, haok investigating")]
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)]
|
||||
//[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5001/")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5001/")]
|
||||
|
|
|
|||
Loading…
Reference in New Issue