6 Answer(s)
-
0
Hi,
This is by design.
but you can change it in your application:
public class YourProjectNamePermissionDefinitionProvider : PermissionDefinitionProvider { public override void Define(IPermissionDefinitionContext context) { ...... var settingManagement = context.GetPermissionOrNull(SettingManagementPermissions.Emailing); settingManagement.MultiTenancySide = MultiTenancySides.Both; ..... } ..... }
[Authorize(SettingManagementPermissions.Emailing)] [Dependency(ReplaceServices = true)] [ExposeServices(typeof(EmailSettingsAppService), typeof(IEmailSettingsAppService))] public class MyEmailSettingsAppService : EmailSettingsAppService { public MyEmailSettingsAppService(ISettingManager settingManager) : base(settingManager) { } public override async Task<EmailSettingsDto> GetAsync() { return new EmailSettingsDto { SmtpHost = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Host), SmtpPort = Convert.ToInt32(await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Port)), SmtpUserName = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.UserName), SmtpPassword = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Password), SmtpDomain = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Domain), SmtpEnableSsl = Convert.ToBoolean(await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.EnableSsl)), SmtpUseDefaultCredentials = Convert.ToBoolean(await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.UseDefaultCredentials)), DefaultFromAddress = await SettingProvider.GetOrNullAsync(EmailSettingNames.DefaultFromAddress), DefaultFromDisplayName = await SettingProvider.GetOrNullAsync(EmailSettingNames.DefaultFromDisplayName), }; } public override async Task UpdateAsync(UpdateEmailSettingsDto input) { if (!CurrentTenant.IsAvailable) { await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Host, input.SmtpHost); await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Port, input.SmtpPort.ToString()); await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.UserName, input.SmtpUserName); await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, input.SmtpPassword); await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Domain, input.SmtpDomain); await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.EnableSsl, input.SmtpEnableSsl.ToString()); await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.UseDefaultCredentials, input.SmtpUseDefaultCredentials.ToString().ToLowerInvariant()); await SettingManager.SetGlobalAsync(EmailSettingNames.DefaultFromAddress, input.DefaultFromAddress); await SettingManager.SetGlobalAsync(EmailSettingNames.DefaultFromDisplayName, input.DefaultFromDisplayName); } else { await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.Host, input.SmtpHost); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.Port, input.SmtpPort.ToString()); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.UserName, input.SmtpUserName); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.Password, input.SmtpPassword); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.Domain, input.SmtpDomain); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.EnableSsl, input.SmtpEnableSsl.ToString()); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.Smtp.UseDefaultCredentials, input.SmtpUseDefaultCredentials.ToString().ToLowerInvariant()); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.DefaultFromAddress, input.DefaultFromAddress); await SettingManager.SetForCurrentTenantAsync(EmailSettingNames.DefaultFromDisplayName, input.DefaultFromDisplayName); } }
-
0
-
0
Hi,
Thanks, we will consider it.
-
0
Hi liangshiwei,
I created fresh project with version 4.4.0, I did not see the following features
Do you have plan add this to default Standard edition properties
Enable account external settings Management Enable email settings Management
Or
When i select "Enable setting management" from features just show this settings for tenants
Tenant should edit own Email Settings and Account External provider settings. These are important settings that distinguish between tenants.
-
0
HI,
See https://github.com/abpframework/abp/pull/9701
It is available in 5.0
-
0
HI,
See https://github.com/abpframework/abp/pull/9701
It is available in 5.0
Thanks, i hope you could add "External provider settings" too