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

Move User registration out of the AccountController #793

Closed
lcharette opened this issue Sep 9, 2017 · 2 comments
Closed

Move User registration out of the AccountController #793

lcharette opened this issue Sep 9, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@lcharette
Copy link
Member

lcharette commented Sep 9, 2017

User creation logic should be factored out of the AccountController, especially the unique user name and email logic.

This will make it easier to create a create-user Bakery command since all verifications prior to the user creation won't be duplicated, but centralized. When writing tests, Factories can also produce false positive since they can generate the same name/email twice.

Note that this is currently an issue since there's major code duplication between AccountController and CreateAdminUser

The User model could be a nice place to do this.

@lcharette lcharette added the standards and best practices Coding guidelines label Sep 9, 2017
@lcharette
Copy link
Member Author

This would probably makes things easier for #623.

@lcharette lcharette added this to the 4.2.0 milestone Dec 16, 2017
@lcharette lcharette added the up-for-grabs Not assigned yet label Dec 16, 2017
@lcharette lcharette self-assigned this Mar 17, 2018
@lcharette lcharette removed the up-for-grabs Not assigned yet label Mar 21, 2018
@lcharette
Copy link
Member Author

Implemented in bd30fa8 for V4.2

Absolutely not perfect, but better than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant