* StreamFile::send404Message() and StreamFile::parseRange() are now deprecated.
Use HTTPFileStreamer::send404Message() and HTTPFileStreamer::parseRange()
respectively instead.
+* Global variable $wgSysopEmailBans is deprecated; to allow sysops to ban
+ users from sending emails, use
+ $wgGroupPermissions['sysop']['blockemail'] = true;
=== Other changes in 1.34 ===
* …
/**
* Allow sysops to ban users from accessing Emailuser
+ * @deprecated since 1.34; `$wgGroupPermissions['sysop']['blockemail'] = true;`
+ * should be used instead
*/
$wgSysopEmailBans = true;
$wgUsersNotifiedOnAllChanges = [];
}
+// $wgSysopEmailBans deprecated in 1.34
+if ( isset( $wgSysopEmailBans ) && $wgSysopEmailBans === false ) {
+ foreach ( $wgGroupPermissions as $group => $_ ) {
+ unset( $wgGroupPermissions[$group]['blockemail'] );
+ }
+}
+
if ( $wgMetaNamespace === false ) {
$wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
}
* @return bool
*/
public static function canBlockEmail( UserIdentity $user ) {
- global $wgEnableUserEmail, $wgSysopEmailBans;
+ global $wgEnableUserEmail;
- return ( $wgEnableUserEmail && $wgSysopEmailBans && MediaWikiServices::getInstance()
+ return ( $wgEnableUserEmail && MediaWikiServices::getInstance()
->getPermissionManager()
->userHasRight( $user, 'blockemail' ) );
}
$this->setMwGlobals( [
'wgEnableEmail' => true,
'wgEnableUserEmail' => true,
- 'wgSysopEmailBans' => true,
] );
$res = $this->doBlock( [ 'noemail' => '' ] );
$this->setMwGlobals( [
'wgEnableEmail' => true,
'wgEnableUserEmail' => true,
- 'wgSysopEmailBans' => true,
] );
$this->setExpectedException( ApiUsageException::class,