Each user has an
adminproperty which when set to
trueallows the user to basically view and change anything for themselves and other users. E.g. admins can see private data of any user such as emails, or modify users usernames.
Some actions are not possible currently because they were originally hardcoded for "do action for the current user" rather than "do action for target user", but all of those are intended to be converted. E.g. that is currently the case for like/unlike, follow/unfollow from the API.
In order to mark a user as admin, direct DB acceess is required.
For example, to make userWe have a helper for that at:It can be called from any directory, e.g.:It currently only works on SQLite.
barack-obamaadmin on a development run:
sqlite3 web/db.sqlite3 "UPDATE \"User\" SET admin = true WHERE username='barack-obama'"
cd web ./bin/make-admin barack-obama
Or e.g. to make
cirosantilliadmin in a Heroku deployment you can run:
heroku maintenance:on -a ourbigbook heroku psql -a ourbigbook -c "UPDATE \"User\" SET admin = true WHERE username='cirosantilli'" heroku maintenance:off -a ourbigbook