Netflix-Skunkworks / Scumblr

Web framework that allows performing periodic syncs of data sources and performing analysis on the identified results
Apache License 2.0
2.64k stars 317 forks source link

Protections needed in place for designated admin account to not be disabled when admin privileges are set #132

Closed espressobeanies closed 7 years ago

espressobeanies commented 7 years ago

FYI. Just happened to me. Two users, one admin, disabled, other was the admin, but attempt to change admin privileges between the two failed.

ahoernecke commented 7 years ago

Hey @espressobeanie,

Thanks for the report. I'm not completely clear on what happened? Can you explain the steps that led to being locked out a little more verbosely?

espressobeanies commented 7 years ago

I was swapping admin privileges between two accounts and the newer account I created to port the admin privileges from the older account was disabled without realizing. So when I removed admin privileges from the older account, it presented me a problem where I could no longer get back to the admin section, forcing me to do rebuild from scratch.

ahoernecke commented 7 years ago

So would your fix recommendation be preventing disabling/removing admin privileges from an admin account if it is the only admin account?

Side note, as a recovery mechanism, you should have been able to connect to the console and update one of the accounts to have admin privileges again. Similar to how the initial account is setup in the installation instructions.

espressobeanies commented 7 years ago

That's a bit complex. I'm thinking something like: If only admin account in Scumblr, force account enabling.

Ahh... didn't think of that. Apologies. Still a n00bie to rails. Thx!