Index: trunk/phase3/includes/specials/SpecialUserrights.php |
— | — | @@ -26,10 +26,14 @@ |
27 | 27 | } |
28 | 28 | |
29 | 29 | public function userCanExecute( $user ) { |
| 30 | + return $this->userCanChangeRights( $user, false ); |
| 31 | + } |
| 32 | + |
| 33 | + public function userCanChangeRights( $user, $checkIfSelf = true ) { |
30 | 34 | $available = $this->changeableGroups(); |
31 | 35 | return !empty( $available['add'] ) |
32 | 36 | or !empty( $available['remove'] ) |
33 | | - or ($this->isself and |
| 37 | + or ( ( $this->isself || !$checkIfSelf ) and |
34 | 38 | (!empty( $available['add-self'] ) |
35 | 39 | or !empty( $available['remove-self'] ))); |
36 | 40 | } |
— | — | @@ -65,7 +69,7 @@ |
66 | 70 | if ($this->mTarget == $wgUser->getName()) |
67 | 71 | $this->isself = true; |
68 | 72 | |
69 | | - if( !$this->userCanExecute( $wgUser ) ) { |
| 73 | + if( !$this->userCanChangeRights( $wgUser, true ) ) { |
70 | 74 | // fixme... there may be intermediate groups we can mention. |
71 | 75 | global $wgOut; |
72 | 76 | $wgOut->showPermissionsErrorPage( array( |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -252,6 +252,8 @@ |
253 | 253 | * (bug 10323) Special:Undelete should have "inverse selection" button |
254 | 254 | * (bug 15831) Modern skin RTL support is bugous |
255 | 255 | * (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 |
256 | 258 | |
257 | 259 | === API changes in 1.14 === |
258 | 260 | |