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

详情

MediaWiki版本:
1.12

默认情况下行政员可以授予所有用户权限,这是由于下面的设置:

$wgGroupPermissions['bureaucrat']['userrights'] = true;

注意如果某個用戶組只能加入部份權限(在此例子是行政員),需要禁止他們有userrights權限,否則他們依然可以加入或移除所有組。

$wgGroupPermissions['bureaucrat']['userrights'] = false;

或者,$wgAddGroups可以以如下方式定义而不必覆盖潜在在扩展中的定义:

$wgAddGroups['bureaucrat'][] = 'sysop';
$wgAddGroups['bureaucrat'][] = 'bot';
MediaWiki版本:
1.11

如果一個用戶組可增加用戶至所有用戶組 (例如行政員能):

$wgAddGroups['bureaucrat'] = true;

如果只可以加入某些組 (例如行政員只能加入管理員或機械人):

$wgAddGroups['bureaucrat'] = [ 'sysop', 'bot' ];

故障排除

找不到权限复选框

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're already in that group and that the groups you are in do not allow the removal of a user from the set groups.

Once a user is in a group, defined by this setting the group checkboxes will only show up if $wgRemoveGroups is also set for the group in question.

參見