* Sylvain Leroux sylvain@chicoree.fr [Sat, 23 Jan 2010 13:33:20 +0100]:
Hi,
For a private wiki, I had the request to add groups of pages to the white-list. Contributors will regularly add (and possibly delete) pages in those groups. So manually editing $wgWhitelistRead appears to be a maintenance
nightmare.
So, is there a way to add regexp or namespace (or any other "collection" of pages) in $wgWhitelistRead?
If not (as I think), is there a hook I could use to patch the
white-list
validation?
Thanks in advance for your answers, Sylvain Leroux
Before checking for title names in $wgWhitelistRead, includes/Title.php calls $wgUser->isAllowed('read') , which itself calls User::getRights(), which uses the hook 'UserGetRights': http://www.mediawiki.org/wiki/Manual:Hooks/UserGetRights which has the User object as a parameter, but unfortunately no Title object passed, so you have to use global $wgTitle then additionally check $wgTitle instanceof Title, I think. Dmitriy