Difference between revisions of "Blocking registration on mediawiki"

From Notes_Wiki
m
m
Line 1: Line 1:
<yambe:breadcrumb>Mediawiki configuration</yambe:breadcrumb>
<yambe:breadcrumb self="Blocking registration on mediawiki">Mediawiki configuration|Mediawiki configuration</yambe:breadcrumb>
=Blocking registration on mediawiki=
=Blocking registration on mediawiki=


Line 38: Line 38:




 
<yambe:breadcrumb self="Blocking registration on mediawiki">Mediawiki configuration|Mediawiki configuration</yambe:breadcrumb>
<yambe:breadcrumb>Mediawiki configuration</yambe:breadcrumb>

Revision as of 09:42, 27 August 2018

<yambe:breadcrumb self="Blocking registration on mediawiki">Mediawiki configuration|Mediawiki configuration</yambe:breadcrumb>

Blocking registration on mediawiki

There are various user groups in MediaWiki. One of the groups is '*' which includes all users (including anonymous users). Registered users are part of group with name 'user'. If users belong to multiple groups then they get highest permission among the various groups, of which they are member.

For example a registered user is member of both '*' and 'user' group. If edit access for '*' is disabled and for 'user' is enabled then user would still be able to edit pages as he would have edit permissions from 'user' group.


Following default permissions are set in file includes/DefaultSettings.php file

// Implicit group for all visitors
$wgGroupPermissions['*']['createaccount']    = true;
$wgGroupPermissions['*']['read']             = true;
$wgGroupPermissions['*']['edit']             = true;
$wgGroupPermissions['*']['createpage']       = true;
$wgGroupPermissions['*']['createtalk']       = true;
$wgGroupPermissions['*']['writeapi']         = true;


To block registration on MediaWiki so that only administrators can add users add following line to 'LocalSettings.php' file

$wgGroupPermissions['*']['createaccount']    = false;

In case you also want to block editing, creation of pages, etc. from unregistered users then set all rights, except read to false for group '*'.

$wgGroupPermissions['*']['edit']             = false;
$wgGroupPermissions['*']['createpage']       = false;
$wgGroupPermissions['*']['createtalk']       = false;
$wgGroupPermissions['*']['writeapi']         = false;


See http://www.mediawiki.org/wiki/Manual:User_rights for more details on user right management in MediaWiki


<yambe:breadcrumb self="Blocking registration on mediawiki">Mediawiki configuration|Mediawiki configuration</yambe:breadcrumb>