r84363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84362‎ | r84363 | r84364 >
Date:00:23, 20 March 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Actually list implicit groups in allusers.

Looks like I might've regressed this in the course of fixing other bugs. Oh well, fixed now
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryAllUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllUsers.php
@@ -225,14 +225,14 @@
226226 $result->setIndexedTagName( $lastUserData['groups'], 'g' );
227227 }
228228
229 - if ( $fld_rights && !is_null( $row->ug_group2 ) ) {
230 - if ( !isset( $lastUserData['rights'] ) ) {
231 - $lastUserData['rights'] = User::getGroupPermissions( User::getImplicitGroups() );
 229+ if ( $fld_groups ) {
 230+ if ( !isset( $lastUserData['groups'] ) ) {
 231+ $lastUserData['groups'] = ApiQueryUsers::getAutoGroups( User::newFromName( $lastUser ) );
232232 }
233 -
234 - $lastUserData['rights'] = array_unique( array_merge( $lastUserData['rights'],
235 - User::getGroupPermissions( array( $row->ug_group2 ) ) ) );
236 - $result->setIndexedTagName( $lastUserData['rights'], 'r' );
 233+ if ( !is_null( $row->ug_group2 ) ) {
 234+ $lastUserData['groups'][] = $row->ug_group2;
 235+ }
 236+ $result->setIndexedTagName( $lastUserData['groups'], 'g' );
237237 }
238238 }
239239

Follow-up revisions

RevisionCommit summaryAuthorDate
r84808Followup r84363...reedy18:39, 26 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79554* (bug 26558) list=allusers auprop=groups does not list groups a user is auto...reedy02:48, 4 January 2011

Comments

#Comment by Reedy (talk | contribs)   00:24, 20 March 2011

It's a regression of bug 265558/r79554

#Comment by Catrope (talk | contribs)   09:23, 20 March 2011

Is this broken on the cluster too?

#Comment by P858snake (talk | contribs)   09:28, 20 March 2011

I believe so.

#Comment by Duplicatebug (talk | contribs)   17:38, 26 March 2011

Rights are missing and some groups have dupes: (action=query&list=allusers&auprop=groups|rights&aulimit=1)

    <allusers>
      <u userid="1" name="User">
        <groups>
          <g implicit="" xml:space="preserve">*</g>
          <g implicit="" xml:space="preserve">user</g>
          <g implicit="" xml:space="preserve">autoconfirmed</g>
          <g>bureaucrat</g>
          <g>bureaucrat</g>
          <g>suppress</g>
          <g>suppress</g>
          <g>sysop</g>
          <g>sysop</g>
        </groups>
      </u>
    </allusers>
#Comment by Reedy (talk | contribs)   18:42, 26 March 2011

Cheers. Looks like I made a complete and utter hash of that original commit, in the mix of working copies, i ended up with a really bodged commit

Status & tagging log