Index: trunk/extensions/CentralAuth/CentralAuthHooks.php |
— | — | @@ -435,14 +435,18 @@ |
436 | 436 | // The user can log in via Special:UserLogin to bypass the blacklist and get a proper |
437 | 437 | // error message. |
438 | 438 | $session = CentralAuthUser::getSession(); |
439 | | - if ( isset( $session['auto-create-blacklist'] ) && in_array( wfWikiID(), (array)$session['auto-create-blacklist'] ) ) { |
| 439 | + if ( isset( $session['auto-create-blacklist'] ) |
| 440 | + && in_array( wfWikiID(), (array)$session['auto-create-blacklist'] ) ) |
| 441 | + { |
440 | 442 | wfDebug( __METHOD__ . ": blacklisted by session\n" ); |
441 | 443 | return false; |
442 | 444 | } |
443 | 445 | |
444 | 446 | // Is the user blocked? |
445 | 447 | $anon = new User; |
446 | | - if ( !$anon->isAllowedToCreateAccount() ) { |
| 448 | + if ( !$anon->isAllowedAny( 'createaccount', 'centralauth-autoaccount' ) |
| 449 | + || $this->isBlockedFromCreateAccount() ) |
| 450 | + { |
447 | 451 | // Blacklist the user to avoid repeated DB queries subsequently |
448 | 452 | // First load the session again in case it changed while the above DB query was in progress |
449 | 453 | wfDebug( __METHOD__ . ": user is blocked from this wiki, blacklisting\n" ); |
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php |
— | — | @@ -361,12 +361,13 @@ |
362 | 362 | 'centralauth-editset-return' => 'Return to main view', |
363 | 363 | |
364 | 364 | // User rights |
365 | | - 'right-globalgroupmembership' => 'Edit membership to global groups', |
366 | | - 'right-centralauth-unmerge' => 'Unmerge global account', |
367 | | - 'right-centralauth-lock' => 'Lock or hide global account', |
368 | | - 'right-centralauth-oversight' => 'Suppress global account', |
369 | | - 'right-centralauth-merge' => 'Merge their account', |
370 | | - 'right-globalgrouppermissions' => 'Manage global groups', |
| 365 | + 'right-globalgroupmembership' => 'Edit membership to global groups', |
| 366 | + 'right-centralauth-autoaccount' => 'Automatically login with global account', |
| 367 | + 'right-centralauth-unmerge' => 'Unmerge global account', |
| 368 | + 'right-centralauth-lock' => 'Lock or hide global account', |
| 369 | + 'right-centralauth-oversight' => 'Suppress global account', |
| 370 | + 'right-centralauth-merge' => 'Merge their account', |
| 371 | + 'right-globalgrouppermissions' => 'Manage global groups', |
371 | 372 | ); |
372 | 373 | |
373 | 374 | /** Message documentation (Message documentation) |
— | — | @@ -517,6 +518,7 @@ |
518 | 519 | 'centralauth-editset-grouplink' => '{{optional}}', |
519 | 520 | 'centralauth-editset-nouse' => '{{Identical|None}}', |
520 | 521 | 'right-globalgroupmembership' => '{{doc-right}}', |
| 522 | + 'right-centralauth-autoaccount' => '{{doc-right|centralauth-autoaccount}}', |
521 | 523 | 'right-centralauth-unmerge' => '{{doc-right|centralauth-unmerge}}', |
522 | 524 | 'right-centralauth-lock' => '{{doc-right|centralauth-lock}}', |
523 | 525 | 'right-centralauth-oversight' => '{{doc-right|centralauth-oversight}}', |