[Mediawiki-l] Setting Permissions for Namespace
Cedric Weber
samaki at gmx.net
Sat Jul 29 10:42:42 UTC 2006
I am trying to set read only permissions for a all except sysops on a
custom namespace I use in my wiki.
First I tried to use the extension for that
(http://meta.wikimedia.org/wiki/Talk:NamespacePermissions_Extension)
but it doesn't seem to work. I'm using mediawiki 1.5.6 -does that
extension require a newer version?
Anyway, I found this link
(http://meta.wikimedia.org/wiki/Preventing_Access#Setting_permissions_for_a_Group_on_a_whole_new_Namespace)
that explains how to do that manually, but I don't really get it:
I managed to restrict read access, but thats not what I wanted.
Here's what I've done so far:
-----------------------------------
in includes/Title.php
if( $wgUser->isAllowed('edit') ) {
if( $this->getNamespace() == 106 ) {
if( $wgUser->isAllowed('editforbidden') ) {
return true;
}
else {
return false;
}
} else {
return true;
}
} else {
global $wgWhitelistRead;
in Localsettings.php
$wgGroupPermissions['sysop']['editforbidden'] = true;
-------------------------------------
I hope someone can give advice, thanx.
--
Cedric Weber, cedric.weber at gmail.com
http://m.zung.us / http://zungu.NET
More information about the MediaWiki-l
mailing list