Closed sastels closed 5 days ago
I had originally changed admin to add a toggle to the user's information page in the platform admin view, but decided that this opened us to a potential escalation of privileges attack if endpoints were not sufficiently secure. So I then decided that it would be better as a flask command that could only be run from within the k8s cluster (or, at least, something connected to the database).
Pond will attempt to QA this today
100% working as expected!
Description
As a platform admin, I need to be able to make others platform admins without manually editing the database.
WHY are we building?
Currently the only way to make someone a platform admin is to open a writeable connection to the database and manually edit the record for that user. This is dangerous.
WHAT are we building?
A flask command to toggle the platform admin flag for a given user.
VALUE created by our solution
Improved security and reliability: We no longer have to manually edit the database to do this fairly common task.
Acceptance Criteria
QA Steps
FLASK_APP=application.py flask command admin -u <your email address> --off
FLASK_APP=application.py flask command admin -u <your email address>