[iOS] Admin Dashboard - User Passwords #1312
Open
+120
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Instead of creating a new view, I added an optional init to the resetUserPasswordViewModel and resetUserPasswordView to allow it to be init using a user that was NOT the current device user. Then, I moved both of these to be modal since they're password reset forms (forms being modal?). Not that I think that's a requirement but more in line with other edit screens.
I've tested that this works for both the current user and another server user. The benefit to this approach is a single ViewModel and also allowing changes to this view in a single location for a more cohesive feel.
The only liberty I took with this (besides changing to this to modal) is I hide the current password field for Server Users since it's likely a password reset on their behalf. That is, you're approaching as an admin so you don't have their current password to reset so there is no reason for the field IMO.
Screenshot
UserView
Server User Password
Device User Password