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:
// Add Custom Namespace $wgExtraNamespaces[110] = "NewNameSpace";
//Add User Group $wgGroupPermissions['NewUserGroup']['move'] = true; $wgGroupPermissions['NewUserGroup' ]['read'] = true; $wgGroupPermissions['NewUserGroup' ]['edit'] = true; $wgGroupPermissions['NewUserGroup' ]['createpage'] = true;
// Limit Access to Namespace by utilising $wgNamespaceProtection
$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?
Kind regards Albert Cremer
Hi a. cremer,
On 6/24/07, a. cremer albert.cremer@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.
Hi,
Thank you !(I think I got it)
"Daniel Cannon" cannon.danielc@gmail.com schrieb im Newsbeitrag news:ca57dce40706241015m7b8824cdrdbcd1cf88cb42972@mail.gmail.com...
Hi a. cremer,
On 6/24/07, a. cremer albert.cremer@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@gmail.com
On 6/24/07, a. cremer albert.cremer@online.de wrote:
Hi,
Thank you !(I think I got it)
Not a problem. Don't hesitate to ask if you have any more difficulties.
mediawiki-l@lists.wikimedia.org