[Mediawiki-l] Limit acces to custom namespace(wgNamespaceProtection)

a. cremer albert.cremer at online.de
Sun Jun 24 17:29:39 UTC 2007


Hi,

Thank you !(I think I got it)


"Daniel Cannon" <cannon.danielc at gmail.com> 
schrieb im Newsbeitrag 
news:ca57dce40706241015m7b8824cdrdbcd1cf88cb42972 at mail.gmail.com...
> Hi a. cremer,
>
> On 6/24/07, a. cremer 
> <albert.cremer at online.de> wrote:
>>
>> Hi,
>>
>> I am really confused about the usage of the 1.10 $wgNamespaceProtection
>> feature.
>>
>> I like to limit access to a custom namespace to a defined user group.
>>
>> Here is what I added to the LocalSettings.php:
>
> <snip>
>
>> $wgNamespaceProtection[110] = array('NewUserGroup');
>>
>> Then I assigned NewUserGroup attributes to a test user. Unfortunately it
>> did
>> not work. In fact no user is allowed to edit articles in the namespace.
>>
>> But by adding
>>
>> $wgNamespaceProtection[110] = array('sysop');
>>
>> to the LocalSettings.php the namespace becomes editable for
>> administrators.
>>
>> Do you have any hint what is wrong with the above mentioned procedure?
>
>
> Indeed I do. $wgNamespaceProtection is an array mapping namespaces to an
> array of *rights*, not user groups. For instance:
>
> $wgGroupPermissions['sysop']['editcoolnamespace'] = true;
> $wgNamespaceProtection[110] = array( 'editcoolnamespace' );
>
> Will limit access to your namespace to those with the 'editcoolnamespace'
> right, in this example sysops.
>
> HTH.
>
> -- 
> Daniel Cannon (AmiDaniel)
>
> http://amidaniel.com
> cannon.danielc at gmail.com 






More information about the MediaWiki-l mailing list