I think Joshua Oreman's approach gets the presentation correct (read-only page) but doesn't secure the page (e.g., against adding "action=edit" to a URL and hacking the page).
Setting Title::userCan('edit') to false also causes the read-only page to be displayed without patching EditPage.php.
-- Joshua
On 8/30/05 11:46 AM, "Joshua Oreman" oremanj@gmail.com wrote:
On 8/30/05, Sy sy1234@gmail.com wrote:
On 8/29/05, Joshua Yeidel yeidel@wsu.edu wrote:
I made a similar change in 1.4 by patching include/Title.php's "userCan()" function
I've put your hack into its own page on meta. If you've got your own user there, feel free to move it.
http://meta.wikimedia.org/wiki/User:Sysy/Joshua_Yeidel%27s_permissions_hack
I'm interested to know if anyone figures something out for 1.5.. I feel that permissions is one of the major barriers to a certain kind of use of mediawiki.
Here's my (very very hacky) way of doing it:
Edit includes/EditPage.php. After these lines if ( !$wgUser->isAllowed('edit') ) { if ( $wgUser->isAnon() ) { $this->userNotLoggedInPage(); return; } else { $wgOut->readOnlyPage( $this->mArticle->getContent( true ), true ); return; } } (about line 185) add these lines: $this->mArticle->fetchContent(); if ( !$wgUser->isSysop() && $this->mArticle->mTitle->getNamespace() == NS_USER && $wgUser->getName() != $this->mArticle->mTitle->getText() ) { $wgOut->readOnlyPage ($this->mArticle->getContent (true), true); return; } Hope this helps.
-- Josh
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l