Last modified: 2010-05-15 15:28:56 UTC
On my wiki, users are assigned usernames. I want to restrict them to only editing specific sections of the wiki. I want to edit mediawiki - I think the file to edit is includes\EditPage.php so that if a person's username contains a colon (e.g. "FOO:Bob") then they can only edit pages that are in the same form (e.g. "FOO:Page_Name"). I want it to treat users with usernames that don't contain a colon normally. E.g. 1) Someone with the username "FOO:Bob" can edit "FOO:Page_Name" but not "BAR:Main_Page". 2) Someone with the username "Bob" can edit "FOO:Page_Name" and "BAR:Main_Page" and "Main_Page" Hope you can help. I'm happy for this edit to take the form of an edit converting "you must login to edit this page" to "you must login and have the right permissions to edit this page". I think that EditPage.php would need to be edited twice in the areas containing the text: if ( !$wgUser->getID() && $wgWhitelistEdit ) { $this->userNotLoggedInPage(); return; } n.b. I was told to post here on: http://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Editing_mediawiki_so_only_certain_users_can_edit_certain_pages
pair of bugs *read privilege* bug 1924: Restricted read access for subset of wiki *edit privilege* bug 679: Editing mediawiki so only certain users can edit certain pages
This isn't something we want to implement in the main software, MediaWiki being about open editing and the wiki way, after all, sorry. You will find, however, that some people *have* done a patch in various states and at various levels which does implement this, so I recommend doing a brief web search, and if you can't find it, use the mailing list.