r41892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41891‎ | r41892 | r41893 >
Date:20:12, 9 October 2008
Author:ialex
Status:old
Tags:
Comment:
(bug 15795) Special:Userrights is now listed on Special:SpecialPages when user can only his rights
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
@@ -26,10 +26,14 @@
2727 }
2828
2929 public function userCanExecute( $user ) {
 30+ return $this->userCanChangeRights( $user, false );
 31+ }
 32+
 33+ public function userCanChangeRights( $user, $checkIfSelf = true ) {
3034 $available = $this->changeableGroups();
3135 return !empty( $available['add'] )
3236 or !empty( $available['remove'] )
33 - or ($this->isself and
 37+ or ( ( $this->isself || !$checkIfSelf ) and
3438 (!empty( $available['add-self'] )
3539 or !empty( $available['remove-self'] )));
3640 }
@@ -65,7 +69,7 @@
6670 if ($this->mTarget == $wgUser->getName())
6771 $this->isself = true;
6872
69 - if( !$this->userCanExecute( $wgUser ) ) {
 73+ if( !$this->userCanChangeRights( $wgUser, true ) ) {
7074 // fixme... there may be intermediate groups we can mention.
7175 global $wgOut;
7276 $wgOut->showPermissionsErrorPage( array(
Index: trunk/phase3/RELEASE-NOTES
@@ -252,6 +252,8 @@
253253 * (bug 10323) Special:Undelete should have "inverse selection" button
254254 * (bug 15831) Modern skin RTL support is bugous
255255 * (bug 15869) Nostalgia skin does not show page title in printable mode
 256+* (bug 15795) Special:Userrights is now listed on Special:SpecialPages when the
 257+ user can only his rights
256258
257259 === API changes in 1.14 ===
258260

Follow-up revisions

RevisionCommit summaryAuthorDate
r42168Merge in latest trunk. Includes revert of r41892, which merge-conflicted. Wil...werdna11:30, 17 October 2008

Status & tagging log