I remember it wrong. I thought it was Id
, good to hear that it working for you.
Hi,
Ok, I understand now.
It's not related to ABP, after my investigation, there seems to be no way to make it work, because it will not consider multi-tenants.
You may need something like this: https://stackoverflow.com/questions/73937191/independent-tenant-sequences-in-multi-tenant-single-db
Could you share the full steps to reproduce? thanks
Hi,
The ConcurrencyStamp
should never be null, because ABP will set it up internally. I'm wondering why your database value is NULL
.
See: https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs#L533
I think you need to check your database table.
Hi,
You can override the PermissionAppService
For example: (no test)
[ExposeServices(typeof(IPermissionAppService))]
public class MyPermissionAppService : PermissionAppService
{
private readonly ITenantRepository _tenantRepository;
private readonly IIdentityRoleRepository _identityRoleRepository;
private readonly ILookupNormalizer _lookupNormalizer;
public MyPermissionAppService(
IPermissionManager permissionManager,
IPermissionDefinitionManager permissionDefinitionManager,
IOptions<PermissionManagementOptions> options,
ISimpleStateCheckerManager<PermissionDefinition> simpleStateCheckerManager,
ITenantRepository tenantRepository,
IIdentityRoleRepository identityRoleRepository,
ILookupNormalizer lookupNormalizer) : base(permissionManager, permissionDefinitionManager, options, simpleStateCheckerManager)
{
_tenantRepository = tenantRepository;
_identityRoleRepository = identityRoleRepository;
_lookupNormalizer = lookupNormalizer;
}
public override async Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input)
{
if(providerName != RolePermissionValueProvider.ProviderName || CurrentTenant.IsAvailable)
{
await base.UpdateAsync(providerName, providerKey, input);
return;
}
await base.UpdateAsync(providerName, providerKey, input);
await UpdateAllTenantRolesAsync(providerName, providerKey, input);
}
private async Task UpdateAllTenantRolesAsync(string providerName, string providerKey, UpdatePermissionsDto input)
{
var roleName = (await _identityRoleRepository.GetAsync(Guid.Parse(providerKey))).Name;
var tenants = await _tenantRepository.GetListAsync();
foreach(var tenant in tenants)
{
using(CurrentTenant.Change(tenant.Id))
{
var tenantRole = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName(roleName));
if(tenantRole == null)
{
continue;
}
await base.UpdateAsync(providerName, tenantRole.Id.ToString(), input);
}
}
}
}
Hi,
I could reproduce the problem and will fix it in the next patch version.
Temporary solution:
[ExposeServices(typeof(IAccountAppService))]
public class MyAccountAppService : AccountAppService
{
public MyAccountAppService(IdentityUserManager userManager, IAccountEmailer accountEmailer, IAccountPhoneService phoneService, IIdentityRoleRepository roleRepository, IdentitySecurityLogManager identitySecurityLogManager, Volo.Abp.BlobStoring.IBlobContainer<AccountProfilePictureContainer> accountProfilePictureContainer, ISettingManager settingManager, IOptions<IdentityOptions> identityOptions, IIdentitySecurityLogRepository securityLogRepository, IImageCompressor imageCompressor, IOptions<AbpProfilePictureOptions> profilePictureOptions, IApplicationInfoAccessor applicationInfoAccessor, IdentityUserTwoFactorChecker identityUserTwoFactorChecker) : base(userManager, accountEmailer, phoneService, roleRepository, identitySecurityLogManager, accountProfilePictureContainer, settingManager, identityOptions, securityLogRepository, imageCompressor, profilePictureOptions, applicationInfoAccessor, identityUserTwoFactorChecker)
{
}
public override async Task<List<string>> GetTwoFactorProvidersAsync(GetTwoFactorProvidersInput input)
{
var providers = await base.GetTwoFactorProvidersAsync(input);
if(providers.Any())
{
var user = await UserManager.GetByIdAsync(input.UserId);
if(!user.HasAuthenticator())
{
providers.RemoveAll(x => x == TwoFactorProviderConsts.Authenticator);
}
}
return providers;
}
}
Hi,
You can check this: https://lurumad.github.io/securing-hangfire-dashboard-using-an-openid-connect-server-identityserver-4
It's for identityserver4, but also for openiddict.
Hi,
You can check this: https://support.abp.io/QA/Questions/5588/Cannot-download-and-add-to-solution-LeptonX#answer-3a0d2ef4-06e6-961e-6d33-0f1fa1c61e31
We may consider supporting the install theme modules in later versions.
Hi,
This is because the permission module is a basic module and other module dependencies depend on it through package references.
So I don't recommend you to add it.
You can explain your use case and I will try to help you
Hi,
1.
You can manually change the version from 7.4.2
to 7.4.3
2.
You can try deleted node_modules,package-lock.json, and try yarn install
again.