issues
search
TheOdinProject
/
theodinproject
Main Website for The Odin Project
http://www.theodinproject.com
MIT License
3.72k
stars
2.07k
forks
source link
Chore: Use state machine with admin user
#4657
Closed
KevinMulhern
closed
2 months ago
KevinMulhern
commented
2 months ago
Because:
A state machine will make it easier to reason about state transitions and make sure the state change rules are enforced
Closes:
https://github.com/TheOdinProject/theodinproject/issues/4658
This commit:
Adds AASM for the state machine DSL
Renames admin user active status to "activated" to be more uniform with the other statuses
Adds a new "pending reactivation" status to hold reactivated users until they set new password and 2fa credentials
Creates activities automatically when an admin user status changes
Adds status traits to admin user factory
Adds current attributes to set the admin user so we can use the current admin user when creating an activity from a model.
Because:
This commit: