Extension:EditOwn

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
EditOwn

Release status: beta

Implementation Hook
Description Unprivileged users can only edit pages they've created themselves
Author(s) Roan Kattouw
Version 1.0 (October 22, 2007)
MediaWiki 1.11
Download SVN
Added rights editall
Hooks used

userCan

EditOwn is an extension that prevents unprivileged users from editing pages they haven't created. Privileged users can of course edit every page.

Contents

[edit] Installation

Create a new directory called "EditOwn" (without the quotes) in your wiki's extensions/ directory. Download the EditOwn.php and EditOwn.i18n.php files from SVN and place them in the newly created directory. Then add the following to the bottom of LocalSettings.php:

require_once("$IP/extensions/EditOwn/EditOwn.php");
$wgGroupPermissions['sysop']['editall'] = true; // Only sysops can edit all pages

Then go to your wiki's Special:Version to verify the installation.

[edit] Permissions

You will probably want to allow some users to edit all pages. To set this up, two approaches are possible:

[edit] Using existing groups

Add any of the following lines to LocalSettings.php to allow existing groups of users to edit all pages:

$wgGroupPermissions['*']['editall'] = true; // Allow *everyone*, including anonymous users, to edit all pages. This makes this extension useless
$wgGroupPermissions['user']['editall'] = true; // Registered users can edit all pages. The usefulness of this setting is also doubtful
$wgGroupPermissions['autoconfirmed']['editall'] = true; // Only users older than $wgAutoConfirmAge can edit all pages
$wgGroupPermissions['sysop']['editall'] = true; // Only sysops can edit all pages. This is the recommended setup
$wgGroupPermissions['bureaucrat']['editall'] = true; // Only bureaucrats can edit all pages

If you have created any custom groups in LocalSettings.php, you can allow these groups to edit all pages by adding

$wgGroupPermissions['groupname']['editall'] = true;

to LocalSettings.php (replace 'groupname' with the name of your custom group).

NOTE: If a user is in multiple groups, they will be able to edit all pages even if that's allowed for only one of those groups. E.g.: if group A can't edit all pages but group B can, a user in both group A and B will be allowed to edit all pages.

[edit] Creating a new group

You can also create a separate group for users who can edit all pages. To do this, add the following line to LocalSettings.php:

$wgGroupPermissions['editall']['editall'] = true;

This creates a new group named 'editall'. Only users in that group can edit all pages. You can add users to the editall group using the Special:Userrights special page.

[edit] Excluding namespaces

You may want to disable EditOwn's functionality for certain namespaces. To do this, add the following line to LocalSettings.php, below the line added earlier (require_once("$IP/extensions/EditOwn/EditOwn.php");):

$wgEditOwnExcludedNamespaces = array(NS_TALK, NS_USER, NS_USER_TALK);

This will disable EditOwn for the Talk, User and User talk namespaces. A list of all namespace constants can be found here.

[edit] Licensing and downloads

The extension is available under the GNU General Public License version 3 or later, and can be downloaded from Subversion, or accessed via the web-based viewer.

The software is provided as-is. Updates will be made where critical vulnerabilities are discovered.

[edit] Contact

EditOwn is currently maintained by Roan Kattouw. If you have any questions, complaints, feature requests, found a bug, or any other reason to contact the maintainer, please send your e-mails to roan.kattouw@home.nl and mention "EditOwn" in the subject.

Personal tools