Hi,
Did you configure email settings?
See https://docs.abp.io/en/abp/latest/Emailing#email-settings
Hi,
On the new Default.cshtml page though the actual Model object is null, so it fails on the line checking Model.Items.Any(). The model in your code is an ApplicationMenu which seems correct.
I can't reproduce the problem.
Can I check it remotely? shiwei.liang@volosoft.com
Hi,
Sorry I forgot your project version, this way only work for projects starting in 4.0.
Using cookies requires your backend and frontend to be on the same domain&port. Maybe you can use cache to store access_token.
I can help you remotely. shiwei.liang@volosoft.com
Hi,
Try:
public class MyProjectNameMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.User)
{
context.Menu.Items.RemoveAll(x => x.Name == "Account.SecurityLogs");
}
}
}
Create Default.cshtml
in the Themes\Lepton\Components\Toolbar\UserMenu
directory:
@using Localization.Resources.AbpUi
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.MultiTenancy
@using Volo.Abp.UI.Navigation
@using Volo.Abp.Users
@inject ICurrentUser CurrentUser
@inject ICurrentTenant CurrentTenant
@inject IHtmlLocalizer<AbpUiResource> L
@model ApplicationMenu
<abp-dropdown>
<abp-dropdown-button link="true" id="dropdownMenuUser">
<img src="@($"/api/account/profile-picture-file/{CurrentUser.GetId()}")" width="21" class="user-avatar">
@if (@CurrentUser.TenantId != null)
{
<span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span>
}
else
{
<span>@CurrentUser.UserName</span>
}
</abp-dropdown-button>
<abp-dropdown-menu align="Right" aria-labelledby="dropdownMenuUser">
<abp-row class="p-2">
<abp-column size="Auto" class="pr-0">
<img src="@($"/api/account/profile-picture-file/{CurrentUser.GetId()}")" class="user-avatar-big" width="48">
</abp-column>
<abp-column class="pl-2">
<span>@L["Welcome"]</span><br />
@if (@CurrentUser.TenantId != null)
{
<small><i>@CurrentTenant.Name</i>\</small><strong>@CurrentUser.UserName</strong>
}
else
{
<strong>@CurrentUser.UserName</strong>
}
</abp-column>
</abp-row>
@if (Model.Items.Any())
{
<abp-dropdown-divider />
foreach (var menuItem in Model.Items)
{
var elementId = string.IsNullOrEmpty(menuItem.ElementId) ? string.Empty : menuItem.ElementId;
var cssClass = string.IsNullOrEmpty(menuItem.CssClass) ? string.Empty : menuItem.CssClass;
var disabled = menuItem.IsDisabled ? "disabled" : string.Empty;
var url = string.IsNullOrEmpty(menuItem.Url) ? "#" : Url.Content(menuItem.Url);
if(menuItem.Name == "Account.Manage")
{
url += "?returnUrl=" + Url.PageLink();
}
<abp-dropdown-item class="@cssClass @disabled" href="@url" id="@elementId" target="@menuItem.Target">
@menuItem.DisplayName
</abp-dropdown-item>
}
}
</abp-dropdown-menu>
</abp-dropdown>
If it is empty, you can return null directly without decrypt
Hi,
This is a problem ,we will fix it soon. thanks for you reporting. See https://github.com/abpframework/abp/pull/7165
Hi,
You should download the source code of the rel-4.1 branch instead of dev branch
Can I check it remotely?(UTC+8) shiwei.liang@volosoft.com
Hi,
Have you tried my suggestion?