Manual:$wgRemoveGroups/zh
From Linux Web Expert
<translate> User rights, access control and monitoring</translate>: $wgRemoveGroups | |
---|---|
控制不同用户组在Special:Userrights可移除的用户组。 |
|
<translate> Introduced in version:</translate> | 1.11.0 |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (数组) |
<translate> Default value:</translate> | [] |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
细节
若某一用户组可以移除任何权限(例:行政员可以移除任何权限):
$wgRemoveGroups['bureaucrat'] = true;
若某一用户组只能移除一些权限(例:行政员只能移除管理员和机器人的用户组):
$wgRemoveGroups['bureaucrat'] = array( 'sysop', 'bot' );
MediaWiki版本: | <translate> ≥</translate> 1.12 |
注意某些只能授予部分权限的用户组(就像本例中的行政员),需要禁止他们的userrights权限,否则他们仍然能够移除所有组。
您也可以通过如下的方式定义$wgRemoveGroups 而不覆盖某个扩展的定义:
$wgRemoveGroups['bureaucrat'][] = 'sysop';
$wgRemoveGroups['bureaucrat'][] = 'bot';
Troubleshooting
Not seeing permission checkboxes
If after setting this, you do not see the group checkboxes on the Special:Userrights page for a particular user, it might mean that they've already been removed from that group and that the groups you are in do not allow the removal of a user from other groups.
Once a user has been removed from a group, defined by this setting the group checkbox for this group will only show up if $wgAddGroups is also set for the group in question.
参见
- $wgAddGroups
- $wgGroupsAddToSelf
- $wgGroupsRemoveFromSelf
- $wgGroupPermissions
- 手册:用户权限 - 关于如何设置用户权限的信息