r92477 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92476‎ | r92477 | r92478 >
Date:21:26, 18 July 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 29938) list=users&usprop=rights shows rights the user doesn't have
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryAllUsers.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -198,6 +198,7 @@
199199 * Correct the documentation of srprop properties
200200 * (bug 28817) Add reference help page link to API Modules
201201 * (bug 29935) Improve formatting of examples in ApiParamInfo
 202+* (bug 29938) list=users&usprop=rights shows rights the user doesn't have
202203
203204 === Languages updated in 1.19 ===
204205
Index: trunk/phase3/includes/api/ApiQueryAllUsers.php
@@ -248,7 +248,7 @@
249249
250250 if ( $fld_rights ) {
251251 if ( !isset( $lastUserData['rights'] ) ) {
252 - $lastUserData['rights'] = User::getGroupPermissions( User::getImplicitGroups() );
 252+ $lastUserData['rights'] = User::getGroupPermissions( User::newFromName( $lastUser )->getAutomaticGroups() );
253253 }
254254 if ( !is_null( $row->ug_group2 ) ) {
255255 $lastUserData['rights'] = array_unique( array_merge( $lastUserData['rights'],
Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -154,7 +154,7 @@
155155
156156 if ( isset( $this->prop['rights'] ) ) {
157157 if ( !isset( $data[$name]['rights'] ) ) {
158 - $data[$name]['rights'] = User::getGroupPermissions( User::getImplicitGroups() );
 158+ $data[$name]['rights'] = User::getGroupPermissions( $user->getAutomaticGroups() );
159159 }
160160
161161 if ( !is_null( $row->ug_group ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r92505MFT r92477, r92480, r92481, r92482, r92484, r9485, r92486...reedy23:14, 18 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92472Refactored new getAutomaticGroups() function out of getEffectiveGroups()aaron20:44, 18 July 2011

Status & tagging log