Closed rmunn closed 1 week ago
12 tests ±0 12 :white_check_mark: ±0 0s :stopwatch: ±0s 4 suites ±0 0 :zzz: ±0 1 files ±0 0 :x: ±0
Results for commit e9ef6eb5. ± Comparison against base commit 4cfc4b56.
:recycle: This comment has been updated with latest results.
Just realized that the way I implemented this, the button will only do something if the user modal was accessed from the admin dashboard. I did that because I thought "We shouldn't put admin-dashboard only code into the user modal" so I put the "resend email" call in the admin dashboard page, rather than in the modal. But really, we want the modal to work the same way no matter what page it's on. So I'm going to move the "resend email" code into the modal itself, so that it will also work if an admin gets to that user modal from clicking on an org member on the org page, or a project member on the project page.
Update: Fixed in commit 2fa7bbbb.
75 tests ±0 75 :white_check_mark: ±0 5s :stopwatch: ±0s 13 suites ±0 0 :zzz: ±0 1 files ±0 0 :x: ±0
Results for commit e9ef6eb5. ± Comparison against base commit 4cfc4b56.
:recycle: This comment has been updated with latest results.
it looks good to me, though I'm not sure I like the idea of putting actions in the user modal, if only because there are no other ones there, and it won't be obvious to go there to send the email, I noted on the issue that it might make sense to be a menu item on the admin dashboard. @myieye what do you think? Feel free to override my suggestion.
Tricky 🤔...
TLDR; I like where @rmunn has it now.
Long version: Putting things in the User details modal has the added benefit that it's available on the admin dashboard, project page and org page (I assume org admins should have this feature eventually).
Ultimately, I like the idea of merging the edit user and user details modals. (e.g. Having an "Edit" button in the User details modal that replaces the modal contents with the Edit form.) It's strange that you have to close the user details modal and open a different one in order to edit the user. Merging them would have the added benefit of also being able to edit a user in the context of a project or org.
I'm not proposing we make that change in this PR! 😉
But that change would result in the user details modal being "one user modal to rule them all". So, I think that's where the "Resend verification email" button belongs.
@myieye - Addressed all your comments. Ready for re-review.
Fix #1210.
User modal now has an admin-only button to resend verification email to any users who aren't verified. Button only shows up if an admin is logged in and the user is unverified.