MediaWiki extension LockAuthor

Clone this repo:
  1. 4141d1b build: Updating mediawiki/mediawiki-codesniffer to 44.0.0 by libraryupgrader · 4 days ago master
  2. 6a099b2 Use overrideConfigValue instead of setMwGlobals by Fomafix · 2 weeks ago
  3. a869018 Localisation updates from https://translatewiki.net. by Translation updater bot · 2 weeks ago
  4. af799e9 build: Updating eslint-config-wikimedia to 0.28.2 by libraryupgrader · 8 weeks ago
  5. c6abb87 build: Updating braces to 3.0.3 by libraryupgrader · 9 weeks ago

LockAuthor

Extension prevents users from editing pages they haven't created. The extension uses blocking strategy, so it requires you to manage edit , create permissions granting by yourself.

The common case to use the extension is to grant users with an editright, so everyone will be allowed to create new pages, but the extension will block editing of other pages created by other users.

# Prevent anonymous editing
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;

# Allow regular users to edit pages
$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['user']['createpage'] = true;

wfLoadExtension( 'LockAuthor' );
// LockAuthor will limit users edit right only to pages
// created by them

# Allow sysop to edit all pages
$wgGroupPermissions['sysop']['editall'] = true;

Requirements:

  • MediaWiki 1.35+

Configuration:

  • $wgLockAuthorExcludedNamespaces - array of namespaces to be excluded from checks
  • $wgLockAuthorActions - array of actions to be checked ( default is [ 'edit', 'create' ])

Rights:

  • editall - grant this right to a group to allow bypassing the extension restrictions