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.
83 lines
2.6 KiB
83 lines
2.6 KiB
2 years ago
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||
|
using Volo.Abp.AuditLogging;
|
||
|
using Volo.Abp.BackgroundJobs;
|
||
|
using Volo.Abp.Emailing;
|
||
|
using Volo.Abp.FeatureManagement;
|
||
|
using Volo.Abp.Identity;
|
||
|
using Volo.Abp.IdentityServer;
|
||
|
using Volo.Abp.Modularity;
|
||
|
using Volo.Abp.MultiTenancy;
|
||
|
using Volo.Abp.ObjectExtending;
|
||
|
using Volo.Abp.PermissionManagement.Identity;
|
||
|
using Volo.Abp.PermissionManagement.IdentityServer;
|
||
|
using Volo.Abp.SettingManagement;
|
||
|
using Volo.Abp.TenantManagement;
|
||
|
using Win_in.Sfs.Auth.MultiTenancy;
|
||
|
|
||
|
namespace Win_in.Sfs.Auth;
|
||
|
|
||
|
[DependsOn(
|
||
|
typeof(AuthDomainSharedModule),
|
||
|
typeof(AbpAuditLoggingDomainModule),
|
||
|
typeof(AbpBackgroundJobsDomainModule),
|
||
|
typeof(AbpFeatureManagementDomainModule),
|
||
|
typeof(AbpIdentityDomainModule),
|
||
|
typeof(AbpPermissionManagementDomainIdentityModule),
|
||
|
typeof(AbpIdentityServerDomainModule),
|
||
|
typeof(AbpPermissionManagementDomainIdentityServerModule),
|
||
|
typeof(AbpSettingManagementDomainModule),
|
||
|
typeof(AbpTenantManagementDomainModule),
|
||
|
typeof(AbpEmailingModule)
|
||
|
)]
|
||
|
public class AuthDomainModule : AbpModule
|
||
|
{
|
||
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
||
|
{
|
||
|
Configure<AbpMultiTenancyOptions>(options =>
|
||
|
{
|
||
|
options.IsEnabled = MultiTenancyConsts.IsEnabled;
|
||
|
});
|
||
|
|
||
|
#if DEBUG
|
||
|
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
|
||
|
#endif
|
||
|
|
||
|
ObjectExtensionManager.Instance
|
||
|
.AddOrUpdateProperty<string>(
|
||
|
new[]
|
||
|
{
|
||
|
typeof(IdentityUser),
|
||
|
typeof(IdentityUserDto),
|
||
|
typeof(IdentityUserCreateDto),
|
||
|
typeof(IdentityUserUpdateDto)
|
||
|
},
|
||
|
AuthConsts.DepartmentCodePropertyName
|
||
|
);
|
||
|
|
||
|
ObjectExtensionManager.Instance
|
||
|
.AddOrUpdateProperty<bool>(
|
||
|
new[]
|
||
|
{
|
||
|
typeof(IdentityUser),
|
||
|
typeof(IdentityUserDto),
|
||
|
typeof(IdentityUserCreateDto),
|
||
|
typeof(IdentityUserUpdateDto)
|
||
|
},
|
||
|
AuthConsts.IsActivePropertyName
|
||
|
);
|
||
|
|
||
|
ObjectExtensionManager.Instance
|
||
|
.AddOrUpdateProperty<string>(
|
||
|
new[]
|
||
|
{
|
||
|
typeof(IdentityRole),
|
||
|
typeof(IdentityRoleDto),
|
||
|
typeof(IdentityRoleCreateDto),
|
||
|
typeof(IdentityRoleUpdateDto)
|
||
|
},
|
||
|
AuthConsts.DescriptionPropertyName
|
||
|
);
|
||
|
}
|
||
|
}
|