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

@ -1,9 +1,6 @@
@using System.Security.Principal @using System.Security.Principal
@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" }))
{ {
@ -17,7 +14,8 @@
</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">
@ -26,7 +24,6 @@
</li> </li>
</ul> </ul>
} }
}
else else
{ {
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">

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/")]