Open main menu

Manual:$wgGroupPermissions/ru

This page is a translated version of the page Manual:$wgGroupPermissions and the translation is 35% complete.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎magyar • ‎polski • ‎português do Brasil • ‎русский • ‎中文 • ‎日本語 • ‎한국어
User Access: $wgGroupPermissions
Использовать это для установки прав доступа для групп и участников.
Появилось, начиная с версии:1.5.0 (r9367)
Удалено в версии:все еще используется
Допустимые значения:(Комплексный массив булевских значений.)
Значение по умолчанию:См. ниже.

Детали

$wgGroupPermissions — массив с двумя параметрами, с помощью которого индексируются группы участников и имеющиеся разрешения. The value can be either TRUE to grant the permission or FALSE if it should not be granted.

Those permissions, which are granted with $wgGroupPermissions, are always cumulative. If a user is member of different groups, then the user will get a right if it is granted to at least one of these groups even if it is not granted to his other groups. In other words, If one of the user's groups has a right, then it is not possible to take the right away using $wgGroupPermissions. Instead use $wgRevokePermissions to revoke permissions.

Пример

$wgGroupPermissions['user']['edit'] = true;

This gives all registered users the ability to edit pages.

Custom user groups

You can also define your own user groups. User group names can be no longer than 255 characters. [1] The groups, which have been defined either in DefaultSettings.php or in LocalSettings.php, can be assigned to users through the wiki Special:Userrights interface.

Пример

# Start with assigning the default permissions from group "autoconfirmed"
$wgGroupPermissions['Trustworthy'] = $wgGroupPermissions['autoconfirmed'];
# Add the permissions from group "bot"
$wgGroupPermissions['Trustworthy'] = array_merge($wgGroupPermissions['Trustworthy'], $wgGroupPermissions['bot']);
# Now modify these rights:
$wgGroupPermissions['Trustworthy']['delete'] = true;
$wgGroupPermissions['Trustworthy']['protect'] = true;
$wgGroupPermissions['Trustworthy']['patrol'] = true;

This creates a group called "Trustworthy". Users of that group have the same permissions as users from the groups "autoconfirmed" and "bot". Additionally, they will be able to delete and protect pages, and to patrol edits.

For in-depth documentation, see Руководство:Права пользователя .

  Внимание: Functionality to make specific pages inaccessible has not been extensively tested for security. Use at your own risk!

Значения по умолчанию

Default values vary from version to version. You may find the one which apply to your mediawiki setup in DefaultSettings.php . For more info visit Руководство:Права пользователя .

Использование в расширениях

Некоторые расширения, такие как RenameUser или CheckUser , добавляют новые права, которые могут быть настроены и присваиваются в том же порядке.

См. также

Примечания

  1. See length of column ug_group in the user_groups table.