* hide some user settings if user is not allowed to send e-mail, but can receive e-mail
* update API 'cannot send e-mail' message
* FIXME: gives 'mailnologin'/'mailnologintext' as error. Error handling should be made more fine grained
* Added $wgUseAJAXCategories allow enabling AJAX based categories system.
This works on all namespaces. Enabled namespaces can be reduces using
$wgAJAXCategoriesNamespaces.
-* Admins could disable some variants using $wgDisabledVariants now. ONLY apply on
- wikis enabled LanguageConverter.
-* A new permission, 'root', is created. Analogous to root users on Unix systems,
- the root permission effectively grants all other permissions on a wiki. Useful
- for debugging and administration.
-* New configuration variable $wgShowPageOnRedlink that can be set to show the page
- instead of an edit interface when visiting a red link. The value can be specified
- for specific usergroups and namespaces.
+* Admins could disable some variants using $wgDisabledVariants now. ONLY apply
+ on wikis enabled LanguageConverter.
+* A new permission, 'root', is created. Analogous to root users on Unix
+ systems, the root permission effectively grants all other permissions on a
+ wiki. Useful for debugging and administration.
+* New configuration variable $wgShowPageOnRedlink that can be set to show the
+ page instead of an edit interface when visiting a red link. The value can be
+ specified for specific usergroups and namespaces.
* (bug 16310) Credits page now lists IP addresses rather than saying the number
of anonymous users that edited the page
+* New permission 'sendemail' added. Default right for all registered users. Can
+ for example be used to prevent new accounts from sending spam.
=== Bug fixes in 1.16 ===
* (bug 20702) Parser functions can now be used correctly in
MediaWiki:Missing-article
* (bug 14117) "redirected from" is now also shown on foreign file redirects
-* (bug 18436) JavaScript-added AJAX messages (from the JS watch/unwatch, for
+* (bug 18436) JavaScript-added AJAX messages (from the JS watch/unwatch, for
instance) no longer include a redundant "display:block" hardcoded style.
* (bug 20802) Fixed thumb.php redirect handling
-* (bug 17747) Only display thumbnail column in file history if the image can
+* (bug 17747) Only display thumbnail column in file history if the image can
be rendered.
* (bug 3421) Live preview no longer breaks user CSS/JS previews
* (bug 11264) The file logo on a file description page for documents (PDF, ...)
$wgGroupPermissions['user']['reupload-shared'] = true;
$wgGroupPermissions['user']['minoredit'] = true;
$wgGroupPermissions['user']['purge'] = true; // can use ?action=purge without clicking "ok"
+$wgGroupPermissions['user']['sendemail'] = true;
// Implicit group for accounts that pass $wgAutoConfirmAge
$wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
}
- if( $wgEnableUserEmail ) {
+ if( $wgEnableUserEmail && $user->isAllowed( 'sendemail' ) ) {
$defaultPreferences['disablemail'] =
array(
'type' => 'toggle',
* @return \bool True if allowed
*/
function canSendEmail() {
- global $wgEnableEmail, $wgEnableUserEmail;
- if( !$wgEnableEmail || !$wgEnableUserEmail ) {
+ global $wgEnableEmail, $wgEnableUserEmail, $wgUser;
+ if( !$wgEnableEmail || !$wgEnableUserEmail || !$wgUser->isAllowed( 'sendemail' ) ) {
return false;
}
$canSend = $this->isEmailConfirmed();
'ipb_already_blocked' => array('code' => 'alreadyblocked', 'info' => "The user you tried to block was already blocked"),
'ipb_blocked_as_range' => array('code' => 'blockedasrange', 'info' => "IP address ``\$1'' was blocked as part of range ``\$2''. You can't unblock the IP invidually, but you can unblock the range as a whole."),
'ipb_cant_unblock' => array('code' => 'cantunblock', 'info' => "The block you specified was not found. It may have been unblocked already"),
- 'mailnologin' => array('code' => 'cantsend', 'info' => "You're not logged in or you don't have a confirmed e-mail address, so you can't send e-mail"),
+ 'mailnologin' => array('code' => 'cantsend', 'info' => "You are not logged in, you do not have a confirmed e-mail address, or you are not allowed to send e-mail to other users, so you cannot send e-mail"),
'usermaildisabled' => array('code' => 'usermaildisabled', 'info' => "User email has been disabled"),
'blockedemailuser' => array('code' => 'blockedfrommail', 'info' => "You have been blocked from sending e-mail"),
'notarget' => array('code' => 'notarget', 'info' => "You have not specified a valid target for this action"),
static function getPermissionsError ( $user, $editToken ) {
if( !$user->canSendEmail() ) {
wfDebug( "User can't send.\n" );
+ // FIXME: this is also the error if user is in a group
+ // that is not allowed to send e-mail (no right
+ // 'sendemail'). Error messages should probably
+ // be more fine grained.
return "mailnologin";
}
'right-override-export-depth' => 'Export pages including linked pages up to a depth of 5',
'right-versiondetail' => 'Show the extended software version information',
'right-root' => 'Perform all actions on the wiki',
+'right-sendemail' => 'Send e-mail to other users',
# User rights log
'rightslog' => 'User rights log',
'right-override-export-depth',
'right-versiondetail',
'right-root',
+ 'right-sendemail',
),
'rightslog' => array(
'rightslog',