Fixes test

This commit is contained in:
Shannon
2021-04-12 16:42:25 +10:00
parent 5ce7127beb
commit 5ed5f0cacb
2 changed files with 14 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Routing
string body = await response.Content.ReadAsStringAsync();
// Assert
Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode);
Assert.AreEqual(HttpStatusCode.NoContent, response.StatusCode);
}
}
@@ -59,6 +59,6 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Routing
public IActionResult Index() => Ok();
public IActionResult News() => Forbid();
public IActionResult News() => NoContent();
}
}

View File

@@ -64,7 +64,8 @@ namespace Umbraco.Extensions
/// Adds the services required for using Members Identity
/// </summary>
public static void AddMembersIdentity(this IServiceCollection services) =>
public static void AddMembersIdentity(this IServiceCollection services)
{
services.AddIdentity<MemberIdentityUser, UmbracoIdentityRole>()
.AddDefaultTokenProviders()
.AddMemberManager<IMemberManager, MemberManager>()
@@ -72,6 +73,16 @@ namespace Umbraco.Extensions
.AddUserStore<MemberUserStore>()
.AddRoleStore<MemberRoleStore>();
services.ConfigureApplicationCookie(x =>
{
// TODO: We may want/need to configure these further
x.LoginPath = null;
x.AccessDeniedPath = null;
x.LogoutPath = null;
});
}
private static void RemoveIntParamenterIfValueGreatherThen(IDictionary<string, string> commands, string parameter, int maxValue)
{
if (commands.TryGetValue(parameter, out var command))