MediaWiki extension LockAuthor

Clone this repo:
  1. 1d3216a build: Updating eslint-config-wikimedia to 0.27.0 by libraryupgrader · 9 days ago master
  2. ce1f388 build: Updating mediawiki/mediawiki-codesniffer to 43.0.0 by libraryupgrader · 6 weeks ago REL1_42
  3. 663adff Localisation updates from https://translatewiki.net. by Translation updater bot · 9 weeks ago
  4. 4dfb8e7 build: Updating dependencies by libraryupgrader · 3 months ago
  5. eef705c build: Updating npm dependencies by libraryupgrader · 3 months 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