abp
abp copied to clipboard
Cant reset user password in UserManagement module
I'm not able to reset the password of a user via the usermanagement module (url: /identity/users). In the PR #1942 it seemed that the functionality was added but then later got removed?
Screenshot:

ABP Framework version: 5.3 User Interface: Angular Database provider: EF Core
Steps needed to reproduce:
- create a new default project via the cli.
- Log in as the default admin
- Navigate to /identity/users and create a new user
- Edit the created user (Actions -> Edit)
- Cant change / update the user password
I have added the password section on Edit Modal. Probably It will release with Rel-6.0 you don't have to wait. here it is the PR https://github.com/abpframework/abp/pull/13584
you can implement it with the dynamic form extension system https://docs.abp.io/en/abp/latest/UI/Angular/Dynamic-Form-Extensions
- Go to
app-routing.module.ts - Create a custom Contributor. (I added an example )
app-routing.module.ts
{
path: 'identity',
loadChildren: () =>
import('@volo/abp.ng.identity').then(m =>
m.IdentityModule.forLazy({
editFormPropContributors: identityEditFormContributors,
}),
),
},
identityEditFormContributors.ts
export const identityEditFormContributors: IdentityCreateFormPropContributors = {
[eIdentityComponents.Users]: [userEditFormContributor],
};
userEditFormContributor.ts
const passwordField = new FormProp<IdentityUserDto>({
type: ePropType.Password,
name: 'password',
displayName: 'AbpIdentity::Password',
id: 'password',
autocomplete: 'new-password',
validators: _ => [Validators.required],
asyncValidators: customAsyncPasswordValidator,
});
export function userEditFormContributor(formProps: FormPropList<IdentityUserDto>) {
formProps.addAfter(passwordField, 'userName', (value, name) => value.name === name);
}
One question? Should host then be able to reset tenants passwords because Im missing that option in 5.3.4
What do you mean by resetting Tenant password. A tenant doesn't have a password but a list of users.
Only resetting tenant admin's password could be possible, if we implement it. However, they can easily reset their own passwords using "forgot password" page.
I think it would be a great feature resetting the tenant's admin password.
What I meant @ebicoglu was as a Host you should be able to select tenant admin users and reset their psswords.
I am closing this, we will track this internally and decide if we can implement this.
BTW, setting password is possible via ABP Commercial Identity Pro module. But setting password of an admin user is a different thing, because the SaaS or Tenant Management module has no dependency to the Identity module.