Mediawiki权限
在1.5.2版本中,在LocalSettings.php这个文件中加入:$wgGroupPermissions['*' ]['createaccount'] = false; 取消匿名用户注册帐号的权力。
$wgGroupPermissions['*' ]['edit'] = false; 取消匿名用户编辑条目的权力。
就可以达到相应的效果。通过类似的设置,应该可以在wiki中建立完善的权限控制。
阻止新用户注册
1.5.x
$wgGroupPermissions['*' ]['createaccount'] = false;
可用的权限
mediawiki已经内置了很多权限,到mediawiki 1.6基本完善,后续版本仍有少量补充。例如,用户注册、页面访问、页面修改、文件上传等都有单独的权限可供配置,从而使站点有良好的权限控制。常用权限如下:
* read:页面浏览
* edit:编辑页面
* createpage:创建新文章
* createaccount:创建帐户
* move:页面移动/文章改名
* upload:图片及文件上传
作为参考,这里是在1.6中默认的组/许可(在includes/DefaultSettings.php中):
// 所有访问者隐含所在的组
$wgGroupPermissions['*' ]['createaccount'] = true;
$wgGroupPermissions['*' ]['read'] = true;
$wgGroupPermissions['*' ]['edit'] = true;
$wgGroupPermissions['*' ]['createpage'] = true;
$wgGroupPermissions['*' ]['createtalk'] = true;
// 所有登录用户隐含所在的组
$wgGroupPermissions['user' ]['move'] = true;
$wgGroupPermissions['user' ]['read'] = true;
$wgGroupPermissions['user' ]['edit'] = true;
$wgGroupPermissions['user' ]['createpage'] = true;
$wgGroupPermissions['user' ]['createtalk'] = true;
$wgGroupPermissions['user' ]['upload'] = true;
$wgGroupPermissions['user' ]['reupload'] = true;
$wgGroupPermissions['user' ]['reupload-shared'] = true;
$wgGroupPermissions['user' ]['minoredit'] = true;
// 所有通过 $wgAutoConfirmAge 的用户隐含所在的组
$wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
// 具有机器人特权的用户可使他们的编辑默认在各种日志页面隐藏起来
$wgGroupPermissions['bot']['bot'] = true;
$wgGroupPermissions['bot']['autoconfirmed'] = true;
// 大多数额外的许可功能都在这里
$wgGroupPermissions['sysop']['block'] = true;
$wgGroupPermissions['sysop']['createaccount'] = true;
$wgGroupPermissions['sysop']['delete'] = true;
// 可以查看被删除的条目,但不能查看或重新载入被删除的文本
$wgGroupPermissions['sysop']['deletedhistory']= true;
$wgGroupPermissions['sysop']['editinterface'] = true;
$wgGroupPermissions['sysop']['import'] = true;
$wgGroupPermissions['sysop']['importupload'] = true;
$wgGroupPermissions['sysop']['move'] = true;
$wgGroupPermissions['sysop']['patrol'] = true;
$wgGroupPermissions['sysop']['protect'] = true;
$wgGroupPermissions['sysop']['rollback'] = true;
$wgGroupPermissions['sysop']['upload'] = true;
$wgGroupPermissions['sysop']['reupload'] = true;
$wgGroupPermissions['sysop']['reupload-shared'] = true;
$wgGroupPermissions['sysop']['unwatchedpages'] = true;
$wgGroupPermissions['sysop']['autoconfirmed'] = true;
不错,很简洁!!!!
static/image/common/sigline.gif
http://img2081.poco.cn/mypoco/myphoto/20110719/00/6035253720110719001400015.png
页:
[1]