Jump to content

Extension:Require Editor Privilege

From mediawiki.org
Revision as of 07:37, 24 December 2011 by Xypron (talk | contribs) (Version 1.4, link to homepage)
MediaWiki extensions manual
Require Editor Privilege Extension
Release status: unknown
Implementation User rights
Description Two new user groups are introduced: Readers can read any article that a user could read in a standard wiki, Editors can do anything a user could do in a standard wiki.
Author(s) Xypron
Latest version 1.4 (24th December, 2011)
MediaWiki
$xyAllowAnonymousRead, $xyAllowUserRead
Licence GPLv3
Download [https://sourceforge.net/projects/reqedpriv/

MediaWiki knows groups that can be given certain privileges:

  • Bureaucrats
  • Sysops
  • Bots
  • Logged on user with verified email address
  • Logged on user with suffciently old account
  • Logged on user
  • Anonymous user

If editing shall be restricted to trusted users this is not possible. Furthermore it is not possible to restrict reading to trusted users which might be necessary when using MediaWiki for sensitive information.

What does this extension do?

Two new user groups are introduced:

  • Readers can read any article that a user could read in a standard wiki.
  • Editors can do anything a user could do in a standard wiki.

You can grant read authorization to anonymous users with:

$xyAllowAnonymousRead = true;

You can grant read authorization to logged on users with:

$xyAllowUserRead      = true;

The Main Page is readable by any user, to allow creation of user accounts.

require_once('extensions/xyRequireEditorPrivilege.php');

Installation

  • Copy the script below with UTF8 encoding to extensions/xyRequireEditorPrivilege.php.
  • For additional language support You may amend the script (English and German already contained.)
  • Add the following lines to LocalSettings.php:
// Allow anonymous users to read?
$xyAllowAnonymousRead = false;
// Allow logged on users without reader privileges to read?
$xyAllowUserRead      = false; 
require_once('extensions/xyRequireEditorPrivilege.php');