THE MOMENT, THE MEMENTO

2006年02月24日

MediaWiki从1.4.x升级至1.5.6后匿名编辑等权限设置失效的修复

标签:, — 吴德文 @ 17:58

前一阵子将几个MediaWiki的站点从1.4.7升级到1.5.6。最近发现了一个问题,即原先是设置为不允许匿名编辑和不允许自由注册的,但是这个设置现在失效了。

Google了一下MediaWiki的安装设置,找到几个网站,发现所说的方法都是用旧版本的方法(即通过$wgWhitelistEdit和$wgWhitelistAccount)。

怎样才能找到新版本下的设置方法呢?忽然想起新的软件包下的UPGRADE有提到LocalSettings.php文件的几个参数要修改的问题。于是重新翻看UPGRADE,终于找到了答案:

=== Configuration changes from 1.4.x: ===

$wgDisableUploads has been replaced with $wgEnableUploads.

$wgWhitelistAccount has been replaced by the ‘createaccount’ permission
key in $wgGroupPermissions. To emulate the old effect of setting:
$wgWhitelistAccount['user'] = 0;
set:
$wgGroupPermissions['*']['createaccount'] = false;

$wgWhitelistEdit has been replaced by the ‘edit’ permission key.
To emulate the old effect of setting:
$wgWhitelistEdit = true;
set:
$wgGroupPermissions['*']['edit'] = false;

If $wgWhitelistRead is set, you must also disable the ‘read’ permission
for it to take affect on anonymous users:
$wgWhitelistRead = array( “Main Page”, “Special:Userlogin” );
$wgGroupPermissions['*']['read'] = false;

Note that you can disable/enable several other permissions by modifying
this configuration array in your LocalSettings.php; see DefaultSettings.php
for the complete default permission set.

If using Memcached, you must enabled it differently now:
$wgUseMemCached = true;
should be replaced with:
$wgMainCacheType = CACHE_MEMCACHED;

根据文中所说的去修改,设置又恢复正常了。

附几个搜索中找到的,有比较多MediaWiki安装设置以及使用帮助的网站:


Related:

2005年02月19日

lost:限制MediaWiki系统匿名用户的权限

标签:, — 吴德文 @ 00:00

restore from http://www.allwiki.com/ (用户权限管理: 以下内容引用自:http://windwood.xmu.edu.cn/” 的http://www.windwood.name/mywork/archives/000364.html” )

昨天安装了一个MediaWiki系统(Wikipedia就是基于这个系统的)。但是它的默认配置是,网站内容对于匿名用户(也就是任何访问网站的用户)都是可读且可写的,而且匿名用户可以注册用户可以不受限制的注册用户。

为了网站内容的安全性,必须限制匿名用户的这些权限,即匿名用户不可编辑网站内容;同时必须加强用户的管理,只有管理员才能创建新用户。经过这样配置之後的动态网站才是可以控制的(毕竟在管理人员不足的情况下是无法相信访问者的自觉性的)。

(全文…)


Related:

Valid XHTML 1.1 Valid CSS! Creative Commons License WordPress 所驱动