Page MenuHomePhabricator

Phase out right-related globals
Closed, ResolvedPublic

Description

Things like $wgSysopUserBans, $wgSysopRangeBans, $wgSysopEmailBans (and any similar ones?) should be phased out, turned into proper rights for $wgGroupPermissions and considered deprecated.

  • $wgSysopUserBans
  • $wgSysopRangeBans
  • $wgSysopEmailBans

Details

Reference
bz18807

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:38 PM
bzimport set Reference to bz18807.
bzimport added a subscriber: Unknown Object (MLST).

Making the changes isn't difficult. Just how the hell do we go about deprecating globals, making sure they work for x future versions (yay, backcompat :/)..?

Or do we just do it, and mark it in the release notes as a breaking change? (How many of these are used in extensions [Not looked myself, as I'm venting, whilst procrastinating from sleep])

Or would we do something like

$blah = false;
if ( $wgUser->isAllowed( 'blahaction' ) ) {
$blah = true;
} else {
global $wgBlahAction;

if ( isset( $wgBlahAction ) && $wgBlahAction ) {
//Maybe whinge about being deprecated
$blah = true;
}

}

if ( $blah ) {
//Do/allow optional shizz here
}

We should come up with a solution like the one in Comment 2 for reducing the globals Bug #9968

happy.melon.wiki wrote:

Most of Setup.php is configuration B/C; I think we probably need a clear-out and documentation blitz in there.

(In reply to Chad H. from comment #0)

Things like $wgSysopUserBans, $wgSysopRangeBans, $wgSysopEmailBans (and any

Only one remaining is $wgSysopEmailBans.

DannyS712 updated the task description. (Show Details)
DannyS712 removed a subscriber: wikibugs-l-list.
DannyS712 subscribed.
DannyS712 updated the task description. (Show Details)