Hi Everyone,
I'm trying to set up different groups. I work in a library in a University. We would like to set up different groups of pages : first group of pages being the main wiki for everyone to come by, the second group would be some kind of intranet wiki for a group of people being the staff of the library, the third group would be some students who follow research classes, and they would have to work on the wiki (group works,...).
So I'm looking into the namespaces, and it looks like it can be my thing. I've set up a group for the students (the most hurried group..), then created a namespace for them. So far, it works.
Now, I'm having some permission issues. With the namespace I created, I set up authorisations as follow : $wgGroupPermissions['students']['edit'] = false; $wgGroupPermissions['students']['editnamespaces'] = true;
If I do leave it that way, the students don't have authorisations to edit namespace pages. I have to set the 'main' edit authorisations to true for it to work, but then, then can edit any pages, which is not our goal.
I am going a wrong road with the namespaces? And if not, where do I have to look into for the right authorisations (they can only edit in the namespaces for the students)?
Thanks !
André Meunier wrote:
So I'm looking into the namespaces, and it looks like it can be my thing. I've set up a group for the students (the most hurried group..), then created a namespace for them. So far, it works.
Now, I'm having some permission issues. With the namespace I created, I set up authorisations as follow : $wgGroupPermissions['students']['edit'] = false; $wgGroupPermissions['students']['editnamespaces'] = true;
I think you missed out on some of the namespace configuration steps. Assuming that the students will have access to a custom, locked out namespace, you need something like:
## Defines the custom namespace as a constant, including its numeric index define("NS_HRCALENDAR",100); ## Adds it as a custom namespace (I don't know if you need to define both the numeric index and the name - to be quite honest, I just now noticed that I had done it) $wgExtraNamespaces[100] = "HRCalendar"; $wgExtraNamespaces[NS_HRCALENDAR] = "HRCalendar"; ## Define a name for the protected namespace permission $wgNamespaceProtection[100] = array( 'editHR' ); ## Grant permission to the UnitLeads group $wgGroupPermissions['UnitLeads']['editHR'] = true;
This is used on our internal calendar to restrict adding of HR events (days off and such) to those who can approve requests. It's an incredibly simple situation - for something as involved as yours, I'd try the Lockdown extension (http://www.mediawiki.org/wiki/Extension:Lockdown)
Here are some pages to get you started: http://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_editing_of_a... http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces http://www.mediawiki.org/wiki/Manual:$wgNamespaceProtection
Hi,
I've looked into the permissions, and the Lockdown extension. From what I understand, you can only limit permissions to a namespace for people who have already the rights in the main wiki? From my tests, if I restrain the rights for my students to edit the main wiki, even if I grant them permissions to edit the namespace, it doesn't work.
Is there a way to go around that? The idea would be to have a general main wiki with general informations, only editable by the staff, then a namespace for the students, where they can do whatever they want.
Thanks
Sean McAfee a écrit :
André Meunier wrote:
So I'm looking into the namespaces, and it looks like it can be my thing. I've set up a group for the students (the most hurried group..), then created a namespace for them. So far, it works.
Now, I'm having some permission issues. With the namespace I created, I set up authorisations as follow : $wgGroupPermissions['students']['edit'] = false; $wgGroupPermissions['students']['editnamespaces'] = true;
I think you missed out on some of the namespace configuration steps. Assuming that the students will have access to a custom, locked out namespace, you need something like:
## Defines the custom namespace as a constant, including its numeric index define("NS_HRCALENDAR",100); ## Adds it as a custom namespace (I don't know if you need to define both the numeric index and the name - to be quite honest, I just now noticed that I had done it) $wgExtraNamespaces[100] = "HRCalendar"; $wgExtraNamespaces[NS_HRCALENDAR] = "HRCalendar"; ## Define a name for the protected namespace permission $wgNamespaceProtection[100] = array( 'editHR' ); ## Grant permission to the UnitLeads group $wgGroupPermissions['UnitLeads']['editHR'] = true;
This is used on our internal calendar to restrict adding of HR events (days off and such) to those who can approve requests. It's an incredibly simple situation - for something as involved as yours, I'd try the Lockdown extension (http://www.mediawiki.org/wiki/Extension:Lockdown)
Here are some pages to get you started: http://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_editing_of_a... http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces http://www.mediawiki.org/wiki/Manual:$wgNamespaceProtection
André Meunier wrote:
Hi,
I've looked into the permissions, and the Lockdown extension. From what I understand, you can only limit permissions to a namespace for people who have already the rights in the main wiki? From my tests, if I restrain the rights for my students to edit the main wiki, even if I grant them permissions to edit the namespace, it doesn't work.
Is there a way to go around that? The idea would be to have a general main wiki with general informations, only editable by the staff, then a namespace for the students, where they can do whatever they want.
Thanks
Set also a lock for the main namespace: $wgNamespaceProtection[NS_MAIN] = array( 'edit_main' );
Now, only those with the edit_main right will be able to edit the pages on the main namespace.
You will need to list all namespaces that people with just edit rights shouldn't edit.
mediawiki-l@lists.wikimedia.org