Creating a user with ShouldChangePasswordOnNextLogin flag true Abp.io 7.2.2

63 Views Asked by At

I need to create a method that inserts a new AbpUsers with the ShouldChangePasswordOnNextLogin marked, but I can't because the column is protected.

Is there any way to solve this? I could generate a random password and send the email too.

I just tried to find a Dto with this column to use the createAsync but I couldn't find it. I guess that still doesn't exists

1

There are 1 best solutions below

0
On

Yes, with respect to the robustness of your operative system concerning fundamental security; thus Not a good idea "I could generate a random password and send the email too." because it violates principles of domain authentication and authorisation built in to remove need for administrative intervention with exposure to sensitive data Because new users boarding business domain is an administrative job, a method such as you describe, along with every projected feature mentioned, would scarce not be available for use straight out of the box You will likely add value with GUI related to integration of layers In short, an API would apply CRUD wise domain logic with respect to the creation of users domain access permissions, including the related flag set of ShouldChangePasswordOnNextLogin