Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add user creation to users list page #3744

Merged
merged 6 commits into from
May 7, 2023
Merged

Conversation

davwheat
Copy link
Member

Supersedes #2998

Progresses #3742

Changes proposed in this pull request:

  • adds new user creation modal to Admin
  • adds button to open this on the users page

Screenshot

image

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

@davwheat davwheat added this to the 1.7 milestone Feb 22, 2023
@davwheat davwheat requested a review from a team as a code owner February 22, 2023 15:36
@davwheat davwheat self-assigned this Feb 22, 2023
@luceos
Copy link
Member

luceos commented Feb 22, 2023

Do we want to allow setting a password by default? Wouldn't it make more sense to create a temporary one instead? And then hook into the password reset logic?

@davwheat
Copy link
Member Author

I think both are valid options, and I was thinking about that myself.

Maybe an option to "force user to reset password to log in"? Question is whether we want to automatically fire the reset pwd email or just state that the user should reset their own password?

Or should we have a separate "someone's made an account for you on xyz", but that's straying into extension territory imo.

@davwheat davwheat force-pushed the dw/users-list/user-creation branch from 1251f5d to 2dbf330 Compare February 23, 2023 09:22
@davwheat
Copy link
Member Author

I've opted to generate a random password on the client-side and provide that, but I do wonder if it's better to generate it in the backend and automate the forgotten password email instead? But I feel a forgotten password for a new user on a site they haven't used yet would be very confusing.

framework/core/locale/core.yml Outdated Show resolved Hide resolved
framework/core/locale/core.yml Outdated Show resolved Hide resolved
framework/core/js/src/admin/components/CreateUserModal.tsx Outdated Show resolved Hide resolved
framework/core/js/src/admin/components/CreateUserModal.tsx Outdated Show resolved Hide resolved
@SychO9 SychO9 modified the milestones: 1.7, 1.8 Mar 6, 2023
@imorland
Copy link
Member

@davwheat what's the situation here? Do you have time to complete these changes so this can be merged, or shall we tackle it?

@davwheat
Copy link
Member Author

Someone else can take it, if they'd like. I don't have the time this week or next.

SychO9 added 3 commits May 7, 2023 17:50
# Conflicts:
#	framework/core/js/src/admin/components/UserListPage.tsx
Signed-off-by: Sami Mazouz <[email protected]>
@SychO9 SychO9 merged commit 21b4836 into main May 7, 2023
@SychO9 SychO9 deleted the dw/users-list/user-creation branch May 7, 2023 17:38
@github-actions github-actions bot mentioned this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants