Demoted myself and now I'm stuck

Hi, I’m setting up a mattermost instance. I accidentally changed myself from “system admin” to “admin” and now since I’m the only user I appear to be locked out of the System Console. Any easy way I can reset it? I’m happy to hack in postgres or blow away the data as needed.

This does appear to be a bug… Someone shouldn’t be able to demote their own account if it’s the last remaining system admin.

cheers,
-Nick

I dropped and recreated the database and teams dir in ./data and now I’m back in. Still, I think this is a bug.

You can use the command line interface

./platform -assign_role -team_name="yourteam" -email="name@yourcompany.com" -role="system_admin"

if the server is running you may need to logout and log back in to pick up the new role.

Awesome thanks a lot!

This is a usability issue that should be fixed, accepting pull requests for anyone who’d like to help here by popping up a warning message.