Как настроить права в MediaWiki

  1. Настроить правила для групп пользователей необходимо в файле /opt/mediawiki/LocalSettings.php:
# The following permissions were set based on your choice in the installer
#$wgGroupPermissions['Trusted'] = $wgGroupPermissions['user'];

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['oathauth-enable'] = false;
$wgGroupPermissions['*']['createtalk'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['editmyoptions'] = true;
$wgGroupPermissions['*']['writeapi'] = false;

$wgGroupPermissions['user']['read'] = true;
$wgGroupPermissions['user']['createaccount'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['user']['upload'] = false;
$wgGroupPermissions['user']['reupload'] = false;
$wgGroupPermissions['user']['movefile'] = false;
$wgGroupPermissions['user']['move'] = false;
$wgGroupPermissions['user']['sendemail'] = false;
$wgGroupPermissions['user']['changetags'] = false;
$wgGroupPermissions['user']['applychangetags'] = false;
$wgGroupPermissions['user']['createtalk'] = false;
$wgGroupPermissions['user']['createpage'] = false;
$wgGroupPermissions['user']['editcontentmodel'] = false;
$wgGroupPermissions['user']['editmyusercss'] = false;
$wgGroupPermissions['user']['editmyuserjson'] = false;
$wgGroupPermissions['user']['minoredit'] = false;
$wgGroupPermissions['user']['move-categorypages'] = false;
$wgGroupPermissions['user']['move-subpages'] = false;
$wgGroupPermissions['user']['move-rootuserpages'] = false;
$wgGroupPermissions['user']['reupload-shared'] = false;
$wgGroupPermissions['user']['purge'] = false;
$wgGroupPermissions['user']['writeapi'] = false;
$wgGroupPermissions['user']['editmyuserjs'] = false;
$wgGroupPermissions['user']['spamblacklistlog'] = false;
$wgGroupPermissions['user']['createbot'] = false;

$wgGroupPermissions['bureaucrat']['edit'] = true;
$wgGroupPermissions['bureaucrat']['userrights'] = false;
$wgGroupPermissions['bureaucrat']['noratelimit'] = false;

# Custom groups for OVT
$wgGroupPermissions['Author']['edit'] = true;

$wgGroupPermissions['Guest']['edit'] = false;
$wgGroupPermissions['Guest']['read'] = true;
$wgGroupPermissions['Guest']['createaccount'] = false;

Пользовательские группы лучше создавать с заглавной буквы, чтобы не путать их с базовыми группами.
Добавляются они прямо в коде LocalSettings.php и никак иначе.  Через админку это не сделать.

  1. Проверить  права на специальной странице.
  2. Создать нового пользователя и дать ему нужную группу

Например, пользовательскую группу Guest:

php /opt/mediawiki/maintenance/createAndPromote.php --custom-groups Guest cli1 <UserSecretPass>

22.08.19