我正在尝试设置权限,我想知道这是否可能。
我希望用户能够创建谈话和讨论页面,但不能编辑内容页面。
只有受信任的用户才能选择编辑内容页面。
这可以在MediaWiki中完成吗?
我已经通读了所有的文档,似乎对于编辑来说,要么全有,要么什么都没有。
我是不是遗漏了什么?
谢谢..。
发布于 2013-03-01 01:16:26
$wgNamespaceProtection让你做到这一点。在你的LocalSettings.php中放入类似这样的内容:
$wgNamespaceProtection[NS_MAIN] = array( 'edit-main' );
//This restricts editing in the main namespace to people in a group that has the 'edit-main' permission.
$wgGroupPermissions['trusted']['edit-main'] = true;
//This means only people in a new 'trusted' group have the 'edit-main' permission或者,用' sysop‘代替'trusted',这意味着sysops也可以编辑主命名空间(以及删除页面和其他sysop权限)。
但是,如果你确实想要一个名为'trusted‘的新组,那么你可能还想在你的wiki上创建包含以下小内容片段的页面,以使界面正确地描述这个新的'trusted’组:
MediaWiki:Group-trusted的页面上,
MediaWiki:Group-trusted-member的页面上,将内容放在名为
MediaWiki:Grouppage-trusted上我是基于Manual:User rights上的“忍者”例子来实现的
https://stackoverflow.com/questions/15085891
复制相似问题