Extension:UserRightsList

The UserRightsList extension provides an alternative to the standard User rights management special page.
 * Bureaucrats can view users as a list instead of searching for a specific user name
 * Users with account creation privileges can view limited rights for other users they created, if user creation logging is enabled
 * The user list can be filtered by group membership, username (with % wildcards), and/or date ranges for user_registration (by month).

Usage


User rights list will appear as a Restricted special page under Special:Specialpages if the user is logged in and has createaccount privileges. The page will determine whether the logged in user has 'userrights' rights (typically assigned to bureaucrats). If the user has 'userrights', they will see all users and will be able to assign them to all available groups. If the user only has 'createaccount', they will only see users that they have created, and will only be able to assign these to custom groups. In the screenshot, we have created a custom group called 'student'.

Long user lists are divided in pages using the usual paging system from query pages. User lists can also be filtered based on criteria controlled by the form at the top of the page. Filters:
 * By group - select one of the available groups
 * By username - this allows SQL wildcards that work with the LIKE operator. Thus, entering S% will find users whose usernames begin with S.
 * user_registration after - find users whose user_registration is during or after a particular month
 * user_registration before - find users whose user_registration is during or before a particular month

These can be used alone or in combination. For the date filters UserRightsList only displays the years when users have registered in the pulldown menu. The selection is ignored if a month is specified without a year.

Installation
Versions after 0.4 use methods from the Userrights class defined by SpecialUserrights.php. This means it won't work on versions prior to 1.12.

Download and uncompress. Put the UserRightsList directory in your extensions directory

Code
Download from the link in the infobox.

Patches
Previous submitted patches incorporated into version 0.3.

1.18 fixes
Changes to any groups are not being saved, because the changed groups are not being passed to the correct method in the parent class.

To fix this, edit the following file:

$IP/extensions/UserRightsList/SpecialUserRightsList.body.php

find the line in the "save_rights" function (around line 61):

and change it to:

--Richard Carter 17:30, 22 January 2013 (UTC)

1.16 fixes
There is a fatal error on save using MW1.16+ and a table rendering problem which affects all versions, I made these changes to our local version which fixed the problems. --Nad 10:20, 2 September 2010 (UTC)

Compatibility with Latest version
In order to run this extension using the latest version of MediaWiki (1.15.1), you'll have to edit the following file:

$IP/extensions/UserRightsList/SpecialUserRightsList.body.php

find line that states (it's under the function __construct):

and replace it with:

Compatibility
This section is part of the compatibility project


 * 1.14alpha trunk as of 22 October 2008 (about r42593): there is a report in the mediawiki-l mailing list that claims that this extension "doesn't seem to work for the trunk version".
 * fixed in 0.52 (I hope) --JimHu 17:13, 14 May 2009 (UTC)
 * Media Wiki Version 1.29.1 - Application is using deprecated SpecialPage Function call and deprecated wgMessage->addMessage method. To fix error change:=

and

You will probably encounter the error if you update your php version.

Versions
A potential injection vulnerability was identified in all versions prior to 0.4. Users of this extension should update!
 * 0.53
 * fixes for new extension standards by Daniel Renfro
 * 0.52
 * fixes compatibility problem for 1.14
 * adds ability to find users not assigned to a group other than User
 * For MW 1.12 and later, use UserRightsList.0.51.tgz
 * For MW 1.9.3 -1.11, use UserRightsList_pre12.tgz

The version for older MW installations was made by copying methods from the MW1.12 version of SpecialUserrights.php until it seemed to work. It's probably still buggy, as it has not been tested much. It might be better to just go ahead and update your MW.