mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.4 KiB
72 lines
2.4 KiB
using Localization.Resources.AbpUi;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
|
|
using Volo.Abp.Mapperly;
|
|
using Volo.Abp.BlazoriseUI;
|
|
using Volo.Abp.Identity.Localization;
|
|
using Volo.Abp.Localization;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.ObjectExtending;
|
|
using Volo.Abp.ObjectExtending.Modularity;
|
|
using Volo.Abp.PermissionManagement.Blazor;
|
|
using Volo.Abp.Threading;
|
|
using Volo.Abp.UI.Navigation;
|
|
|
|
namespace Volo.Abp.Identity.Blazor;
|
|
|
|
[DependsOn(
|
|
typeof(AbpIdentityApplicationContractsModule),
|
|
typeof(AbpMapperlyModule),
|
|
typeof(AbpPermissionManagementBlazorModule),
|
|
typeof(AbpBlazoriseUIModule)
|
|
)]
|
|
public class AbpIdentityBlazorModule : AbpModule
|
|
{
|
|
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.AddMapperlyObjectMapper<AbpIdentityBlazorModule>();
|
|
|
|
Configure<AbpNavigationOptions>(options =>
|
|
{
|
|
options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor());
|
|
});
|
|
|
|
Configure<AbpRouterOptions>(options =>
|
|
{
|
|
options.AdditionalAssemblies.Add(typeof(AbpIdentityBlazorModule).Assembly);
|
|
});
|
|
|
|
Configure<AbpLocalizationOptions>(options =>
|
|
{
|
|
options.Resources
|
|
.Get<IdentityResource>()
|
|
.AddBaseTypes(
|
|
typeof(AbpUiResource)
|
|
);
|
|
});
|
|
}
|
|
|
|
public override void PostConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
OneTimeRunner.Run(() =>
|
|
{
|
|
ModuleExtensionConfigurationHelper
|
|
.ApplyEntityConfigurationToUi(
|
|
IdentityModuleExtensionConsts.ModuleName,
|
|
IdentityModuleExtensionConsts.EntityNames.Role,
|
|
createFormTypes: new[] { typeof(IdentityRoleCreateDto) },
|
|
editFormTypes: new[] { typeof(IdentityRoleUpdateDto) }
|
|
);
|
|
|
|
ModuleExtensionConfigurationHelper
|
|
.ApplyEntityConfigurationToUi(
|
|
IdentityModuleExtensionConsts.ModuleName,
|
|
IdentityModuleExtensionConsts.EntityNames.User,
|
|
createFormTypes: new[] { typeof(IdentityUserCreateDto) },
|
|
editFormTypes: new[] { typeof(IdentityUserUpdateDto) }
|
|
);
|
|
});
|
|
}
|
|
}
|
|
|