Extension:KeepYourHandsToYourself

From MediaWiki.org

Jump to: navigation, search

           

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
KeepYourHandsToYourself

Release status: beta

Implementation  User rights
Description Prevents user from editing other users pages and subpages.
Author(s)  Jim R. Wilson (Jimbojw)
Last Version  0.3
MediaWiki  1.6.x, 1.9.x, 1.10.x or higher
License The MIT License
Download KeepYourHandsToYourself.php

check usage (experimental)

The KeepYourHandsToYourself Extension prevents users from editing other users' pages, subpages and images.

Non-logged in users (guests) are also prevented from editing user pages. Sysops are immune from this restriction.

Project Homepage
KeepYourHandsToYourself Extension - Jimbojw.com
Source Code
KeepYourHandsToYourself.php
Licensing
KeepYourHandsToYourself is released under The MIT License.

[edit] Installation

  1. Download KeepYourHandsToYourself, and be sure to rename the downloaded file to KeepYourHandsToYourself.php.
  2. Drop this script in $IP/extensions
    Note: $IP is your MediaWiki install dir.
  3. Enable the extension by adding this line to your LocalSettings.php:
    require_once('extensions/KeepYourHandsToYourself.php');
    

[edit] Images and other Restrictions

An additional feature (added in version 0.2), is that editing images is also filtered by user. If an image contains a double dash '--', then anything before the double-dash is considered to be a username. Only that user can edit that image.

For example, consider [[Image:SomeUser--avatar.jpg]]. That image would only be editable by SomeUser (or a sysop since they're immune to all restrictions).

In order to implement this restriction, it is necessary that user names do not themselves contain double dashes. To this end, an additional hooking method is supplied which will reject new accounts if the username contains double dashes.

Verson 0.3 added an image processing hook to prepend the user name to the file name for non-sysops.

[edit] See also