phenopolis / phenopolis_genomics_browser

Python API and React frontend for the Phenopolis Genomics Browser
https://dev-live.phenopolis.org
MIT License
31 stars 2 forks source link

Use decorator, user can delete/enable itself #355

Closed alanwilter closed 3 years ago

alanwilter commented 3 years ago

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.

netlify[bot] commented 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

YuanTian1991 commented 3 years ago

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.