Hi
abp suite 2.9 version will be released today
Do you mean the file was replaced, but it didn't work?
Sorry, I mean use free start template to reproduce this problem, commercial project has your license information.
Hi,
Permission definitions are not persisted to the database. You can use DataSeedContributor
add anything seed data.
Hi
Can your use CLI to create a simple project to reproduce this problem?
Hi,
Try :
using (_currentTenant.Change(tenant.Id))
{
await ServiceProvider.
GetRequiredService<KantanDbMigrationService>()
.MigrateTenantDatabasesAsync(tenant);
// init seed data
await _dataSeeder.SeedAsync(tenant.Id);
}
You can custom DataSeedContributor
to add more seed data, Like this:
public class CustomDataSeedContributor : IDataSeedContributor, ITransientDependency
{
private readonly IIdentityUserRepository _identityUserRepository;
public CustomDataSeedContributor(IIdentityUserRepository identityUserRepository)
{
_identityUserRepository = identityUserRepository;
}
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
_identityUserRepository.InsertAsync(...);
}
}
Hi,
See https://docs.abp.io/en/abp/latest/Audit-Logging#audit-log-contributors
Hi,
Try
public class CustomDatatableExtensionsBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.ReplaceOne(
"/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js",
"your datatables-extensions.js");
}
}
Configure<AbpBundlingOptions>(options =>
{
options.ScriptBundles
.Configure(LeptonThemeBundles.Scripts.Global, bundle =>
{
bundle.Contributors.Add(typeof(CustomDatatableExtensionsBundleContributor));
});
});
Add IdentityServerTenantResolveContributor
class to your project.
public class IdentityServerTenantResolveContributor : HttpTenantResolveContributorBase
{
public override string Name => "IdentityServer";
protected override string GetTenantIdOrNameFromHttpContextOrNull(ITenantResolveContext context,
HttpContext httpContext)
{
if (httpContext.Request.Path == "/Account/Login" && httpContext.Request.Query.ContainsKey("ReturnUrl"))
{
var interaction = httpContext.RequestServices.GetService<IIdentityServerInteractionService>();
var authorizationContext = AsyncHelper.RunSync(() =>
interaction.GetAuthorizationContextAsync(httpContext.Request.Query["ReturnUrl"]));
if (context != null)
{
//TODO: Reference AspNetCore MultiTenancy module and use options to get the tenant key!
var tenantIdOrName = authorizationContext.Parameters[context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey];
return tenantIdOrName;
}
}
return null;
}
}
Then configure AbpTenantResolveOptions
options to add IdentityServerTenantResolveContributor
in AuthServerHostModule
.
Configure<AbpTenantResolveOptions>(opt =>
{
opt.TenantResolvers.Add(new IdentityServerTenantResolveContributor());
});
Hi,
Display problem only,You can continue to login as a tenant users.