Blocking registration on mediawiki

From Notes_Wiki
Revision as of 13:13, 28 July 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 6.x > Web based tools or applications > Mediawiki configuration > 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


Home > CentOS > CentOS 6.x > Web based tools or applications > Mediawiki configuration > Blocking registration on mediawiki