CSteipp has submitted this change and it was merged.

Change subject: (bug 22317) Do not prevent unification if home wiki is blocked
......................................................................


(bug 22317) Do not prevent unification if home wiki is blocked

This check didn't make to much sense as right now it's by far
easier for stewards to stop a vandal using one global account
than having to deal with several local ones.

Change-Id: I32384d6423d3cb633f99cdcd2745f8ce6d8c597e
---
M CentralAuth.i18n.php
M CentralAuthUser.php
M specials/SpecialMergeAccount.php
3 files changed, 1 insertion(+), 19 deletions(-)

Approvals:
  CSteipp: Verified; Looks good to me, approved



diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index 1a15aab..026f35c 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -68,10 +68,6 @@
        'centralauth-not-owner-text'  => 'The username "$1" was automatically 
assigned to the owner of the account on $2.
 
 If this is you, you can finish the login unification process simply by typing 
the master password for that account here:',
-       'centralauth-blocked-text'    => 'Your home wiki (listed below) is 
blocked from editing.
-Please contact an administrator in this wiki to unblock it.
-While it is blocked, you cannot merge your accounts.',
-
        'centralauth-notice-dryrun'   => "<div class='successbox'>Demo mode 
only</div><br clear='all'/>",
 
        'centralauth-disabled-dryrun' => "Account unification is currently in a 
demo / debugging mode, so actual merging operations are disabled.
@@ -440,7 +436,6 @@
 Status message after successful unification of a user account.',
        'centralauth-incomplete-text' => '{{doc-important|Please leave 
{{msg|Centralauth-groupname|text=<nowiki>{{int:Centralauth-groupname}}</nowiki>}}
 exactly as it is.}}
 Status message after incomplete unification of a user account.',
-       'centralauth-blocked-text' => 'Status message after failed unification 
of a user account because a wiki is closed.',
        'centralauth-notice-dryrun' => 'Message displayed while account 
unification is in demonstration mode.',
        'centralauth-disabled-dryrun' => 'Message displayed while account 
unification is disabled.',
        'centralauth-error-locked' => "Message displayed while account 
unification is not possible because the acting user's account is locked.",
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 6dc2d72..88718dc 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -747,12 +747,6 @@
                $home = $this->chooseHomeWiki( $migrationSet );
                $local = $migrationSet[$home];
 
-               // If home account is blocked...
-               if ( $local['blocked'] ) {
-                       wfDebugLog( 'CentralAuth', "dry run: $home blocked, 
forbid migration" );
-                       return Status::newFatal( 'centralauth-blocked-text' );
-               }
-
                // And we need to match the home wiki before proceeding...
                if ( $this->matchHashes( $passwords, $local['id'], 
$local['password'] ) ) {
                        wfDebugLog( 'CentralAuth', "dry run: passed password 
match to home $home" );
@@ -797,11 +791,6 @@
                $home = $migrationSet[$this->mHomeWiki];
                $this->mEmail = $home['email'];
                $this->mEmailAuthenticated = $home['emailAuthenticated'];
-
-               if ( $home['blocked'] ) {
-                       wfDebugLog( 'CentralAuth', $this->mHomeWiki . ' 
blocked, forbid migration' );
-                       return false;
-               }
 
                $attach = $this->prepareMigration( $migrationSet, $passwords );
 
diff --git a/specials/SpecialMergeAccount.php b/specials/SpecialMergeAccount.php
index 5e9ced4..add62f9 100644
--- a/specials/SpecialMergeAccount.php
+++ b/specials/SpecialMergeAccount.php
@@ -209,9 +209,7 @@
                        $this->getOutput()->addHTML( '</div>' );
 
                        // Show wiki list if required
-                       if ( $status->hasMessage( 'centralauth-blocked-text' )
-                               || $status->hasMessage( 
'centralauth-merge-home-password' ) )
-                       {
+                       if ( $status->hasMessage( 
'centralauth-merge-home-password' ) ) {
                                $out = '<h2>' . $this->msg( 
'centralauth-list-home-title' )->escaped() . '</h2>';
                                $out .= $this->msg( 
'centralauth-list-home-dryrun' )->parseAsBlock();
                                $out .= $this->listAttached( array( $home ), 
array( $home => 'primary' ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/41916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I32384d6423d3cb633f99cdcd2745f8ce6d8c597e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>
Gerrit-Reviewer: CSteipp <cste...@wikimedia.org>
Gerrit-Reviewer: Hoo man <h...@online.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to