mediawiki / smw-user-protect
用于根据某些语义属性保护页面的扩展
0.1.2
2018-06-18 10:17 UTC
Requires
- php: >=5.3.0
- composer/installers: 1.*,>=1.0.1
- mediawiki/semantic-media-wiki: >=2.0
This package is auto-updated.
Last update: 2024-09-15 02:43:20 UTC
README
专门用于根据用户的语义属性保护页面的扩展。
参数
// 总是允许的组
$GLOBALS['wgSMWUserProtectGroups'] = array( 'sysop', 'team' );
// 用户属性
$GLOBALS['wgSMWUserProtectProps'] = array( 'Has User' );
// 允许保护的命名空间
$GLOBALS['wgSMWUserProtectNS'] = array( NS_REQUEST, NS_SAMPLE, NS_PROCESS );
$GLOBALS['wgSMWUserProtectNSParent'] = array( NS_REQUEST );
// 根据值禁止编辑
$GLOBALS['wgSMWUserProtectEditClose'] = array (
NS_REQUEST => array(
"Has Request Status" => array( "Accepted", "Closed", "Discarded" )
)
);
// 如果访问用户不在上述组中,避免阅读用户页面
$GLOBALS['wgSMWUserProtectUserPages'] = true;
// 阻止非所有者用户编辑用户页面。如果之前的 wgSMWUserProtectUserPages 为 false,则更有意义
$GLOBALS['wgSMWUserProtectEditUserPages'] = true;