[Mediawiki-l] Group and articles permissions
Didier Courtaud
Didier.Courtaud at cea.fr
Tue Sep 20 12:09:36 UTC 2005
Hi all !
After looking for many solutions, I have found the one coming from Nick Kossifidis
available at http://bugzilla.wikimedia.org/show_bug.cgi?id=1924
which is exactly the one I was looking for !
His patch allows to restrict sub-regions of the wiki to a "user right"
which can be assigned to a user group. For instance ( inside LocalSettings.php ) :
1 ) create a new namespace
$wgExtraNamespaces = array(100 => "Sysopspace", 101 => "Sysopspace_Talk");
2 ) Assign it a user right :
$wgGroupPermissions['sysop']['namespaceGrp1'] = true;
$wgGroupPermissions['sysop']['namespaceGrp2'] = true;
3 ) then restrict the namespace for the desired right
$wgRestrictedNamespaces = array(100 => "namespaceGrp1", 101 => "namespaceGrp2");
All these steps can be repeated as may times as you need !
After that, you can organize your wiki by creating customized namespaces
and restricting their access and MW becomes a true CMS solution !
Thanks to Nick and hope it will be integrated in the final 1.5 version of Mediawiki
DC
On Tue, Aug 09, 2005 at 10:36:02AM -0400, Gregory Szorc wrote:
> Currently, there are two places where MediaWiki handles permissions.
>
> 1) At the user level in User.php. MediaWiki assigns generic
> permissions like read, edit, move, etc. (See DefaultSettings.php for
> a list)
>
> 2) At the page level in Title.php (see the UserCan function around
> line 900). MediaWiki checks whether a user has permissions for a
> selected page. In order for the user to have edit permissions on
> article Foo, the user must first have the edit permission at the user
> level and edit permissions at the article level. However,
> permissions at the article level seem to be non-existent.
>
> The new permission system in 1.5 only seems to apply to users and
> groups, not to articles. As you can see from the UserCan function,
> some limitations are hard-imposed based on namespace, but these
> aren't customizable without editing the MediaWiki code base. If you
> want to start a hack on the permissions system, this is the place to
> start looking. Also, individual pages can have specific restrictions
> put on them (see page.page_restrictions in the database), but this
> layout is not desirable for a CMS (a whole new table for this field
> is desirable). If you want to hack MediaWiki to be a true CMS, some
> more major changes to the permissions system are necessary.
>
> Greg
>
>
> On Aug 9, 2005, at 9:30 AM, Didier Courtaud wrote:
>
> > Hi
> >
> > I am a newbie to Mediawiki and I apologize if this question has
> > already been posted to this list but I did not see it in the
> > archives !
> >
> > I have just installed Mediawiki 1.5 beta 4 since I wanted to test
> > the new permissions sytem of this release to make an Intranet CMS !
> >
> > I try with success to disable the access for anonymous users, to
> > create groups of users, ....
> >
> > But I have not understood if it is possible to make thinks like this :
> >
> > Let say we have two groups of users named G1 and G2 and a set of
> > articles named A1 to An
> >
> > What I want to do is to say that users from the G1 group can
> > access ( read and/or write ) to articles A1 to A100 , that
> > uers from the group G2 can access articles A101 to A200 and that
> > users from the both groups can access to articles A201 to An
> >
> > I have seen the patch made to create a restrict group but :
> >
> > - it does not yet work with the version 1.5 of MediaWiki
> > - it is not sufficient because it only creates a group restrict
> > and it clearily not sufficient to make what I want to make
> >
> > Does anyone can help me ?
> >
> > Thanks by advance
> >
> > DC
> > _______________________________________________
> > MediaWiki-l mailing list
> > MediaWiki-l at Wikimedia.org
> > http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
> >
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
More information about the MediaWiki-l
mailing list