Hello, i recently upgraded from 1.17.0 to 1.27.0 and now experience issues with a custom extension hook i wrote for 1.17 using the userCan hook.
Basicly i want to restrict read access overall (using $wgGroupPermissions['*']['read'] = false;) but (re-)grant it for anonymous users based on categorys. The extension hooks in the userCan hook and lists the categorys of the article. If one of the category names match a regular expression defined in LocalSettings.php, read access should be granted.
The issue seems not to be directly code related as debug output reveals, that the userCan is called correctly and the extension also returns the right result in the $result variable. Mediawiki 1.20.0 just seems to ignore the "true" result in the userCan hook: the login prompt is shown.
My LocalSettings.php looks like this: $wgGroupPermissions['*']['read'] = false; ... $wgWhitelistRead = array(some_static_pagenames); ... require_once("$IP/extensions/CategoryWhitelist.php"); $wgCategoryWhitelist = array('public', 'Bar.*'); //any article in category "public" or in a category starting with "Bar"
The Extension code is here: http://beni.hallinger.org/caving/CategoryWhitelist.php.txt
What am i doing wrong?