Changing user password doesn't work on non-root users
Description
Problem/Justification
Impact
is blocked by
is duplicated by
relates to
Activity
Bug Clerk January 20, 2023 at 7:17 PM
22.12.1 PR: https://github.com/truenas/webui/pull/7614
Automation for Jira January 20, 2023 at 7:17 PM
This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.
Caleb January 18, 2023 at 12:00 PM
Should do auth.me
and that should have a pw_uid
key, then you can do user.query [['uid', '=', pw_uid]]
to get the user and that should return an object with an id
key which represents the database id that can be passed to user.update
Ievgen Stepanovych January 18, 2023 at 11:24 AM
Increasing scope to:
We should only show Change Form menu item if this is a local user (as opposed to an Active Directory user). Use
user.query
(by uid?) to check and hide menu item if this is not the case.Add unit test case for this.
When Change password form is submitted replace hardcoded root id with database id of the currently logged in user.
When setting up TrueNAS choose to use an admin user instead of root.
I think you can achieve the same result by resetting configuration in Settings.
Login user admin user.
Try to change form.
ER: I can change password for an admin user.
AR: Root id is hardcoded and I cannot change password for admin.
Created ticked for getting current user from middleware (
auth.me
)FE task is released in terms of this task: