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:
Praburaj 2015-03-03 16:49:00 -08:00
parent 1df35b8e8b
commit 7b8ace5489
2 changed files with 15 additions and 18 deletions

View File

@ -2,9 +2,6 @@
@if (User.IsSignedIn()) @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()
@ -16,16 +13,16 @@
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li> <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
</ul> </ul>
} }
} }
else //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 //This code block necessary only for NTLM authentication
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<p class="nav navbar-text navbar-right">Hello, @User.GetUserName()!</p> <p class="nav navbar-text navbar-right">Hello, @User.GetUserName()!</p>
</li> </li>
</ul> </ul>
}
} }
else else
{ {

View File

@ -10,7 +10,7 @@ namespace E2ETests
{ {
public partial class SmokeTests public partial class SmokeTests
{ {
[ConditionalTheory(Skip = "Auth changes broke this, haok investigating")] [ConditionalTheory]
[OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)]
//[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5001/")] //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5001/")]
[InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5001/")] [InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5001/")]