Index: trunk/phase3/includes/api/ApiQueryUserInfo.php |
— | — | @@ -80,6 +80,13 @@ |
81 | 81 | $vals['rights'] = array_values(array_unique($wgUser->getRights())); |
82 | 82 | $result->setIndexedTagName($vals['rights'], 'r'); // even if empty |
83 | 83 | } |
| 84 | + if (isset($this->prop['changeablegroups'])) { |
| 85 | + $vals['changeablegroups'] = $wgUser->changeableGroups(); |
| 86 | + $result->setIndexedTagName($vals['changeablegroups']['add'], 'g'); |
| 87 | + $result->setIndexedTagName($vals['changeablegroups']['remove'], 'g'); |
| 88 | + $result->setIndexedTagName($vals['changeablegroups']['add-self'], 'g'); |
| 89 | + $result->setIndexedTagName($vals['changeablegroups']['remove-self'], 'g'); |
| 90 | + } |
84 | 91 | if (isset($this->prop['options'])) { |
85 | 92 | $vals['options'] = (is_null($wgUser->mOptions) ? User::getDefaultOptions() : $wgUser->mOptions); |
86 | 93 | } |
— | — | @@ -144,6 +151,7 @@ |
145 | 152 | 'hasmsg', |
146 | 153 | 'groups', |
147 | 154 | 'rights', |
| 155 | + 'changeablegroups', |
148 | 156 | 'options', |
149 | 157 | 'preferencestoken', |
150 | 158 | 'editcount', |
— | — | @@ -161,7 +169,8 @@ |
162 | 170 | ' blockinfo - tags if the current user is blocked, by whom, and for what reason', |
163 | 171 | ' hasmsg - adds a tag "message" if the current user has pending messages', |
164 | 172 | ' groups - lists all the groups the current user belongs to', |
165 | | - ' rights - lists of all rights the current user has', |
| 173 | + ' rights - lists all the rights the current user has', |
| 174 | + ' changeablegroups - lists the groups the current user can add to and remove from', |
166 | 175 | ' options - lists all preferences the current user has set', |
167 | 176 | ' editcount - adds the current user\'s edit count', |
168 | 177 | ' ratelimits - lists all rate limits applying to the current user' |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -342,6 +342,7 @@ |
343 | 343 | * (bug 15935) Added action=userrights to add/remove users to/from groups |
344 | 344 | * (bug 18099) Using appendtext to edit a non-existent page causes an interface |
345 | 345 | message to be included in the page text |
| 346 | +* Added uiprop=changeablegroups to meta=userinfo |
346 | 347 | |
347 | 348 | === Languages updated in 1.15 === |
348 | 349 | |