r55757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55756‎ | r55757 | r55758 >
Date:15:58, 2 September 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 20446) When changing user rights with User@remotewiki and remotewiki is the local wiki, the user is now treated as the local user
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -281,13 +281,17 @@
282282 $database = '';
283283 } else {
284284 list( $name, $database ) = array_map( 'trim', $parts );
285 -
286 - if( !$wgUser->isAllowed( 'userrights-interwiki' ) ) {
287 - return new WikiErrorMsg( 'userrights-no-interwiki' );
 285+
 286+ if( $database == wfWikiID() ) {
 287+ $database = '';
 288+ } else {
 289+ if( !$wgUser->isAllowed( 'userrights-interwiki' ) ) {
 290+ return new WikiErrorMsg( 'userrights-no-interwiki' );
 291+ }
 292+ if( !UserRightsProxy::validDatabase( $database ) ) {
 293+ return new WikiErrorMsg( 'userrights-nodatabase', $database );
 294+ }
288295 }
289 - if( !UserRightsProxy::validDatabase( $database ) ) {
290 - return new WikiErrorMsg( 'userrights-nodatabase', $database );
291 - }
292296 }
293297
294298 if( $name == '' ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -452,6 +452,8 @@
453453 * (bug 14900) __INDEX__ and __NOINDEX__ no longer override site config set in
454454 $wgArticleRobotPolicies.
455455 * (bug 20466) Hidden categories are no more displayed when printing
 456+* (bug 20446) When changing user rights with User@remotewiki and remotewiki is
 457+ the local wiki, the user is now treated as the local user
456458
457459 == API changes in 1.16 ==
458460

Comments

#Comment by Mike.lifeguard (talk | contribs)   21:14, 2 September 2009

Does this merge the "remote" and "local" logs as well? I'm not sure we want @metawiki log entries floating around forever...

#Comment by IAlex (talk | contribs)   21:26, 2 September 2009

This will be only for new entries. A maintenance script would be needed to update old entries in the database.

#Comment by Mike.lifeguard (talk | contribs)   22:07, 2 September 2009

Shall I re-open that bug, or open a new one for a maintenance script to do it?

#Comment by MZMcBride (talk | contribs)   23:33, 16 July 2013

For reference: bugzilla:43913.

Status & tagging log