Good luck : )
Yes, you can manually add to the DI system or implement the ITransientDependency
interface.
So, Does it work for you?
HI,
My Assumption: Steps are: 1- create new tenant via Angular app. 2- Add new connection string in angular UI to point to new tenant DB. 3- Run the DbMigrator app without changing any configuration i.e. DB connection url.
Yes.
Regarding Point 5: ABPRoles table has "isPublic" column. How i can get roles for any tenant if "isPublic" is 1. If we use roles across mulitple tenants and users will there be any functional challenges? My assumption is Roles are filtered based on "TenantId".
The tenant's data is completely isolated, You cannot get the roles of all tenants via a single query, you must to switch each tenant to get a role.
Regarding Point 7, i have looked into the provided url "https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities" and followed "Entity Extensions (EF Core)".
ObjectExtensionManager.Instance
.MapEfCoreProperty<IdentityUser, string>(
"SocialSecurityNumber",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(32); // Here is the action of defining database mapping
}
);
See https://github.com/abpframework/abp/blob/21a280856c9060ba7ecdb748b50a38aec6053dac/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeedContributor.cs#L37
PermissionDataSeedContributor
will grants all permissions to the admin role. you can replace the service:
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(PermissionDataSeedContributor),typeof(IDataSeedContributor))]
public class MyPermissionDataSeedContributor : PermissionDataSeedContributor
{
public MyPermissionDataSeedContributor(IPermissionDefinitionManager permissionDefinitionManager, IPermissionDataSeeder permissionDataSeeder, ICurrentTenant currentTenant) : base(permissionDefinitionManager, permissionDataSeeder, currentTenant)
{
}
public override Task SeedAsync(DataSeedContext context)
{
var multiTenancySide = CurrentTenant.GetMultiTenancySide();
var permissionNames = PermissionDefinitionManager
.GetPermissions()
.Where(p => p.MultiTenancySide.HasFlag(multiTenancySide))
.Where(p => !p.Providers.Any() || p.Providers.Contains(RolePermissionValueProvider.ProviderName))
.Select(p => p.Name)
.Where(x=>....)//Filter the permissions you want
.ToArray();
return PermissionDataSeeder.SeedAsync(
RolePermissionValueProvider.ProviderName,
"admin",
permissionNames,
context?.TenantId
);
}
}
Hi
Of course you can. see https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface. see also: https://support.abp.io/QA/Questions/423/AccountModule-How-to-custom-layout-account-pro
Hi
Can you explain in detail?
Hi,
Did you solve this problem?
Hi,
When you create a user, there are actually two processes
So it will trigger two events. But if you only update the user, the event will only be triggered once.
ok. I will check it out.