I made a similar change in 1.4 by patching include/Title.php's "userCan()" function (see below). [I haven't looked at 1.5; it is probably different.] My patch enables this-user-only editing of User: pages and subpages. Superusers are NOT enabled to edit by this patch; maybe you can work that out with this to start from.
The thing to note is that "userCan" runs a number of tests, each one returning "false" if the user "can't". If no test does a "return", then userCan() returns "true". So you can add as many disqualifying tests as needed.
-- Joshua Yeidel, Systems Professional | yeidel@wsu.edu Center for Teaching, Learning, | net.standard disclaimers apply And Technology | Washington State University | "Believe it if you need it, Pullman, WA 99164-1223 | or leave it if you dare..." Ph: 509/335-0438 FAX 509/335-0540 | -- Robert Hunter
diff -u -r1.1.1.1 Title.php --- Title.php 21 Jun 2005 22:31:06 -0000 1.1.1.1 +++ Title.php 29 Aug 2005 20:56:59 -0000 @@ -803,6 +803,17 @@ wfProfileOut( $fname ); return false; } + + # CTLT - make user pages and subpages editable only by owning user + if ( NS_USER == $this->mNamespace && $action = 'edit' + && $wgUser->getID() != 0 #not anonymous user + && !preg_match('/^'.preg_quote($wgUser->getName(), '/').'/?/', $this->mTextform) ) { + # user is not owner + wfProfileOut( $fname ); + return false; + } + # end CTLT mod
foreach( $this->getRestrictions($action) as $right ) { if( '' != $right && !$wgUser->isAllowed( $right ) ) {
On 8/29/05 1:41 PM, "Bass, Joshua L" joshua.l.bass@lmco.com wrote:
I have upgraded to 1.5 and want to know if there is a way to prevent others from editing user pages (i.e. wiki/User:Fakename). I want to only allow "Fakename" to edit his/her page, and also allow superusers to edit the page as well. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l