context.Services.RemoveAll(x => x.ServiceType == typeof(IRoleValidator<IdentityRole>)); context.Services.AddScoped<IRoleValidator<IdentityRole>, MyRoleValidator>();
Thank you.
hi
sorry, You can add the class to
Identity Domain
orFapRat Domain
.
Hey,
I know there are two DomainModules, my question was which one do I have to put it in, what and how?
You gave me these two in the links:
https://github.com/dotnet/aspnetcore/blob/release/7.0/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs#L85 https://github.com/dotnet/aspnetcore/blob/release/7.0/src/Identity/Extensions.Core/src/RoleValidator.cs#L34
Where are these two classes:
public class RoleValidator<TRole> : IRoleValidator<TRole> where TRole : class { ... }
public static class IdentityServiceCollectionExtensions { ... }
I need to know where I put it and how I put it inside the DomainModule so that I can override or disable the RoleValidator.
Could you show me the code in practice?
Hey,
With reference to the image of the structure above, in which domain module?
It's not clear where to put it and how, regarding these two links you gave me.
Could you be more detailed?
hi
There is
RoleValidator
service that you can override or remove.https://github.com/dotnet/aspnetcore/blob/release/7.0/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs#L85 https://github.com/dotnet/aspnetcore/blob/release/7.0/src/Identity/Extensions.Core/src/RoleValidator.cs#L34
Hi,
But where would I put the RoleValidor to replace within this identityPro structure?
Hi,
I downloaded the Identity Pro module. I created an IsActive extaProperties for the IdentityRole entity.
I need to allow duplicate profiles to be registered as long as one of the profiles is deactivated.
However, in the IdentityRoleAppService class, when I create a new profile, it executes this method (await RoleManager.CreateAsync(role)).CheckErrors();
In this CheckErrors() it is validating duplicate names.
How do I disable this validation.
Already tried:
[ExposeServices(typeof(IdentityRoleAppService), typeof(IIdentityRoleAppService))] [DisableValidation] [Authorize(IdentityPermissions.Roles.Default)] public class IdentityRoleAppService : IdentityAppServiceBase, IIdentityRoleAppService
[DisableValidation] [Authorize(IdentityPermissions.Roles.Create)] public virtual async Task<IdentityRoleDto> CreateAsync(IdentityRoleCreateDto input)
In this case it doesn't look like validation, but it also doesn't insert the record //(await RoleManager.CreateAsync(role)).CheckErrors(); await RoleManager.CreateAsync(role);
can you help me?
Hi,
I don't understand, ABP Suite doesn't support Macos?
Hi,
I have a MacOS and I'm trying to generate a screen with APB Suite.
When I click on generate it is generating the entity in the TenantDbContext instead of generating it in the DbContext.
can you help me?
Hi,
I need help with editing ABP SUite Templates.
I'm creating a property called IsActive. How do I check if this property exists in the Server.Entity.Entity.txt template.
I need to do an if and if the property exists I need to insert the following method into the code:
public virtual void SetIsActive(bool isActive) { IsActive = isActive; }
can you help me?
hi
. However, it does not appear on the hangfire dashboard.
Is the job executed?
Hi,
Yes
Hi,
Regarding BackgroundJobs, I did it according to the documentation and integration with hangfire. However, it does not appear on the hangfire dashboard.
can you help me?