HI,
You should send a Ajax request when click page button.
e.g:
$(function(){
$(".pagedButton").click(function(){
$.ajax({
...
}).done(function(result){
$(".travelModel").html(result);
})
})
})
Hi,
But now the Frontend crashes (Blazor), because the Page (AuditLogs -> Action -> Details) seems to expect a valid JSON:
Can you provide steps to reproduce? thanks.
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);
}
}
Hi,
Do you mean how to configure IdentityServer in mobile app?
You can check this: https://stackoverflow.com/questions/57042378/xamarin-forms-identityserver-external-providers-facebook-google
I create a new solution with Template type is Module template.
ABP suite current only supported add module to application template, You can install it manually: https://docs.abp.io/en/commercial/latest/modules/file-management
How to migrate FmDirectoryDescriptors, FmFileDescriptors tables into Oracle?
See https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Oracle
Hi,
I remember that native apps like android and ios apps don't have cookies, make a mobile login page to send a request to the token endpoint is a better way.
Hi,
Got it, I think you can create an audit Log Contributors : https://docs.abp.io/en/abp/latest/Audit-Logging#audit-log-contributors
public class MyAuditLogContributor : AuditLogContributor
{
public override void PostContribute(AuditLogContributionContext context)
{
foreach (var action in context.AuditInfo.Actions)
{
if (action.Parameters.Length > 2000)
{
action.Parameters = action.Parameters.Substring(0, 1999);
}
}
}
}
Hi,
Can you provide steps to reproduce? thanks.
Hi,
You can custom the AuditLog entity.
Try:
public class MigrationDbContext
{
......
protected override void OnModelCreating(ModelBuilder builder)
{
.......
builder.Entity<AuditLog>(b =>
{
b.Property(x => x.Comments).HasMaxLength(int.MaxValue);
});
}
}
And add & apply migration.