[dreamwidth/dreamwidth] 75c10b: stop suspending yourself, stop suspending yourself...
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: 75c10b004e30da5b4d3efa99737c7f1378aee494 https://github.com/dreamwidth/dreamwidth/commit/75c10b004e30da5b4d3efa99737c7f1378aee494 Author: Jen kareila@dreamwidth.org Date: 2023-06-18 (Sun, 18 Jun 2023)
Changed paths: M cgi-bin/LJ/Console/Command.pm
Log Message:
stop suspending yourself, stop suspending yourself (#3125)
rahaeli says this is the line of code that prevents an admin from
reversing their own suspension if they accidentally suspend
themselves. (Which with the amount of spam accounts we've been dealing
with lately, is not that hard to do.)
It prevents any console command from being executed by a user who doesn't have a statusvis of V.
There are a LOT of other statusvis codes! Looking at the available
helper methods, is_inactive
seems like the right one to use. It
encompasses the S (suspended), D (deleted), and X (expunged) codes.
But it still needs to be overridden.
So: don't allow a deleted/suspended/purged user to run a console command... unless the user has the suspend priv.
Fixes #3111.