Browse Source

Merge pull request #7154 from abpframework/liangshiwei/template-patch-1

Set returnUrl for Web.Host account management button
pull/7155/head
maliming 6 years ago
committed by GitHub
parent
commit
c8e036dbae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/Menus/MyProjectNameMenuContributor.cs

3
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/Menus/MyProjectNameMenuContributor.cs

@ -58,7 +58,8 @@ namespace MyCompanyName.MyProjectName.Web.Menus
if (currentUser.IsAuthenticated)
{
context.Menu.AddItem(new ApplicationMenuItem("Account.Manage", accountStringLocalizer["ManageYourProfile"], $"{identityServerUrl.EnsureEndsWith('/')}Account/Manage", icon: "fa fa-cog", order: 1000, null, "_blank"));
context.Menu.AddItem(new ApplicationMenuItem("Account.Manage", accountStringLocalizer["ManageYourProfile"],
$"{identityServerUrl.EnsureEndsWith('/')}Account/Manage?returnUrl={_configuration["App:SelfUrl"]}", icon: "fa fa-cog", order: 1000, null, "_blank"));
context.Menu.AddItem(new ApplicationMenuItem("Account.Logout", l["Logout"], url: "~/Account/Logout", icon: "fa fa-power-off", order: int.MaxValue - 1000));
}

Loading…
Cancel
Save