Fixes test
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user