Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -198,6 +198,7 @@ |
199 | 199 | * Correct the documentation of srprop properties |
200 | 200 | * (bug 28817) Add reference help page link to API Modules |
201 | 201 | * (bug 29935) Improve formatting of examples in ApiParamInfo |
| 202 | +* (bug 29938) list=users&usprop=rights shows rights the user doesn't have |
202 | 203 | |
203 | 204 | === Languages updated in 1.19 === |
204 | 205 | |
Index: trunk/phase3/includes/api/ApiQueryAllUsers.php |
— | — | @@ -248,7 +248,7 @@ |
249 | 249 | |
250 | 250 | if ( $fld_rights ) { |
251 | 251 | if ( !isset( $lastUserData['rights'] ) ) { |
252 | | - $lastUserData['rights'] = User::getGroupPermissions( User::getImplicitGroups() ); |
| 252 | + $lastUserData['rights'] = User::getGroupPermissions( User::newFromName( $lastUser )->getAutomaticGroups() ); |
253 | 253 | } |
254 | 254 | if ( !is_null( $row->ug_group2 ) ) { |
255 | 255 | $lastUserData['rights'] = array_unique( array_merge( $lastUserData['rights'], |
Index: trunk/phase3/includes/api/ApiQueryUsers.php |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | |
156 | 156 | if ( isset( $this->prop['rights'] ) ) { |
157 | 157 | if ( !isset( $data[$name]['rights'] ) ) { |
158 | | - $data[$name]['rights'] = User::getGroupPermissions( User::getImplicitGroups() ); |
| 158 | + $data[$name]['rights'] = User::getGroupPermissions( $user->getAutomaticGroups() ); |
159 | 159 | } |
160 | 160 | |
161 | 161 | if ( !is_null( $row->ug_group ) ) { |