[Mediawiki-l] right to discuss

FxParlant f-x.p at laposte.net
Sun Oct 9 08:24:53 UTC 2005


Hello,

First, thanks to the developpers for the userrights management system in
1.5.

Now, here are the rights I'd like to set up:

1- Anybody can create an account (looks like default)
2- Only logged in users can edit (described in [[Help:User_levels]])
3- Logged in users can only __edit discussion pages__ (namespace=1)
4- Sysop can edit all pages
5- bureaucrat can makesysop (looks like default)


In mediawiki 1.3 I simply added a line in Title.php (function userCanEdit())

if ( !(1 == $this->mNamespace) && !$wgUser->isSysop() ) { return false; }



Here things are a bit more tricky.
Should I create a special right ("discuss") and insert in userCan():

if ( !(1 == $this->mNamespace) && !$wgUser->isAllowed('discuss') ) {
            wfProfileOut( $fname );
            return false;
        }

Or is there another way?

Thanks for any help.

François




More information about the MediaWiki-l mailing list