[Mediawiki-l] Limiting use/visibility of special-pages

Thomas Dalton thomas.dalton at gmail.com
Tue Mar 3 23:44:18 UTC 2009


2009/2/14 Peter Velan <pv0001 at dynapic.net>:
> Hello,
>
> I installed the extension
> <http://www.mediawiki.org/wiki/Extension:NamespacePermissions>.
>
> After defining new groups and granting rights to some users, these
> rights are shown in detail on Special:ListUsers. How could I remove this
> information from page Special:ListUsers?
>
> Could I declare every Special:<page> to be a "Restricted special page"
> (a page beeing shown in bold on "Special:SpecialPages" )?

If you're happy altering the PHP just change this line in SpecialListUser.php

$item = wfSpecialList( $name, $groups );

to

$item = wfSpecialList( $name );

(I haven't tested that, but it ought to work.)

Of course, that stops even admins seeing the list of user groups. If
you want admins to still be able to see it, try something like

if ($wgUser->isAllowed('viewusergroups') then $item = wfSpecialList(
$name, $groups ); else $item = wfSpecialList( $name );

(Don't forget to add 'global $wgUser' to the top of the function.)

And then give admins, any whoever else, the viewusergoups permission.

Remember, such changes to the PHP will be undone should you upgrade to
a new version of MediaWiki.



More information about the MediaWiki-l mailing list