am 01.03.2009 19:16 schrieb Platonides:
Peter Velan schrieb:
Ah ok, you mean, that I should modify this
routine ...
#~~~~~~~~~~~~~~~~~~
function namespacePermissionsCheckNamespace( $title, $user, $action,
$result ) {
if ( ( $ns = $title->getNamespace() ) >= 100 ) {
if ( ! $user->isAllowed("ns{$ns}_{$action}") ) {
$result = false;
return false;
}
}
return true;
}
#~~~~~~~~~~~~~~~~~~
... to return a FALSE if called with which arguments? Could you please
declare it with more detail?
Yes. Add if ($ns == -1) return false; before the return true.
Hmm now even the sysop has no chance to open a special page :-(
You may also be able to achieve the same using the
Lockdown extension
http://www.mediawiki.org/wiki/Extension:Lockdown It allows both
namespace restriction ($wgNamespacePermissionLockdown) and special page
restriction ($wgSpecialPageLockdown).
Yep, this one works, but the first method would not require an
additional extension to be installed.
You can completely replace NamespacePermissions with Lockdown.
Ah, ok will take a closer look to Lockdown and select the extension best
suited to our needs!
Thanks for the quick response!
Peter