Skip to content

V13: Allow anonymous calls for UmbLoginStatusController.HandleLogout action#17807

Merged
kjac merged 1 commit intorelease/13.6from
v13/bugfix/allow-anonymous-logout-action
Dec 16, 2024
Merged

V13: Allow anonymous calls for UmbLoginStatusController.HandleLogout action#17807
kjac merged 1 commit intorelease/13.6from
v13/bugfix/allow-anonymous-logout-action

Conversation

@elit0451
Copy link
Contributor

Details

Test

  • Create RegisterMember.cshtml partial view from snippet;
  • Create Login.cshtml partial view from snippet;
  • Create LoginStatus.cshtml partial view from snippet;
  • Create a doc type contentPage and in its template add:
@using Umbraco.Cms.Web.Common.PublishedModels;
@using Umbraco.Cms.Core.Services;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.ContentPage>
@inject IMemberService MemberService
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
	Layout = null;
	var isLoggedIn = Context.User?.Identity?.IsAuthenticated ?? false;
}

@if (!isLoggedIn)
{
    @await Html.PartialAsync("RegisterMember")
    <hr/>
    <br/>
    @await Html.PartialAsync("Login")
}
else
{
    @await Html.PartialAsync("LoginStatus")
}
  • Register a member - you will be logged in;
  • Verify that you can logout when the member still exists;
  • Login again;
  • Delete the member from the backoffice;
  • Verify that you are able to logout with the member after deletion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants