Jump to content

手册:$wgRemoveGroups

From mediawiki.org
This page is a translated version of the page Manual:$wgRemoveGroups and the translation is 71% complete.
用户权限、访问控制和监视: $wgRemoveGroups
控制不同用户组在Special:Userrights可移除的用户组。
引进版本:1.11.0
移除版本:仍在使用
允许的值:(数组)
默认值:[]

细节

若某一用户组可以移除任何权限(例:行政员可以移除任何权限):

$wgRemoveGroups['bureaucrat'] = true;

若某一用户组只能移除一些权限(例:行政员只能移除管理员和机器人的用户组):

$wgRemoveGroups['bureaucrat'] = array( 'sysop', 'bot' );
MediaWiki版本:
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.

参见