1- You need to customize the register component to ask user "subdomain" name. and you need to modify the backend to send this data.
The register action URL is /api/account/register
. it's in the Account.Pro module. \Volo.Abp.Account.Pro.Public.Application\Volo\Abp\Account\AccountAppService.cs
This is the register method of AccountAppService. You can override this method and add a Subdomain property to RegisterDto. check out https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
public virtual async Task<IdentityUserDto> RegisterAsync(RegisterDto input)
{
await CheckSelfRegistrationAsync();
if (await UseCaptchaOnRegistration())
{
var reCaptchaValidator = await RecaptchaValidatorFactory.CreateAsync();
await reCaptchaValidator.ValidateAsync(input.CaptchaResponse);
}
await IdentityOptions.SetAsync();
var user = new IdentityUser(GuidGenerator.Create(), input.UserName, input.EmailAddress, CurrentTenant.Id);
input.MapExtraPropertiesTo(user);
(await UserManager.CreateAsync(user, input.Password)).CheckErrors();
(await UserManager.AddDefaultRolesAsync(user)).CheckErrors();
if (!user.EmailConfirmed)
{
await SendEmailConfirmationTokenAsync(user, input.AppName, input.ReturnUrl, input.ReturnUrlHash);
}
return ObjectMapper.Map<IdentityUser, IdentityUserDto>(user);
}
https://community.abp.io/articles/how-to-add-custom-property-to-the-user-entity-6ggxiddr
https://gist.github.com/mehmet-erim/b93759e97bd3f43bf98aca29bdd1fe66 https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project
2- You can check out this topic https://support.abp.io/QA/Questions/1340/How-to-removedisable-validation-for-existing-DTO-object . In this topic user is trying to remove validation from an existing DTO. It's similar to your requirement. You are trying to replace an appservice with your own modified one.
sometimes Microsoft also broken!
https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-5.0
we already created an internal ticket for this issue
fyi @gterdem
@mehmet received your email. we'll get back to you once we finish
if you are using your module with project references then you must be able to debug it. if you are using package references then it's not possible (you need to reference it as project reference)
thanks for the feedback
If there was a authorization, will you use a real user account to authorize? it sounds odd. you need to make a new manager service (domain service) to operate your background job without any authorization requirement. otherwise you break best practises.
@cellero , I'll check this and get back to you
See the related PR => https://github.com/abpframework/abp/pull/7753/files The issue => https://github.com/abpframework/abp/issues/7752