autumnal halcy is a user on You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
autumnal halcy @halcy

@Gargron How did I make somebody admin-y again?

· Web · 0 · 0

@halcy from console: User.first.update(admin: true) (if you are the first user in the db)

@Gargron haaa, can I easily use that for other users also? Or better to just do it in the DB?

@halcy you can do `User.find_by(email: '')` or you can use `Account.find_local('username').user` to get to the right user object. Avoid direct db manipulations tbh.

@Gargron Thanks! I'll try that. (also, how do I open the console again? I should probably make a script for this >>)