Closed alanwilter closed 3 years ago
:heavy_check_mark: Deploy Preview for phenopolis-dev canceled.
:hammer: Explore the source changes: 47e0ece64392244cc68caff7e75d1aa66822190c
:mag: Inspect the deploy log: https://app.netlify.com/sites/phenopolis-dev/deploys/60b17702f0779b00071172f3
I remember that if a user was disabled, then he/she can't log in the system anymore. If so, there is no way he can re-enable himself again. Thus, the disable became a one-time action, and follow actions (delete the account or re-enable) are require Admin to do.
The idea here is, besides Admin, user can either:
Note that if we intend to use this endpoint for User, then some frontend tweak is needed in the User's profile page or similar (think how user can change its password).
If we want just the Admin to operate, then it's just a matter of changing the decorator from
@requires_admin_or_user
to@requires_admin
.