Manual:$wgWhitelistReadRegexp

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgWhitelistReadRegexp and the translation is 46% complete.

Other languages:
English • ‎日本語
利用者アクセス: $wgWhitelistReadRegexp
Whitelists publicly readable titles with regular expressions.
導入されたバージョン:1.21.0 (Gerrit change 11137; git #550b878e)
除去されたバージョン:使用中
許容される値:(正規表現の配列) または false
既定値:false

詳細

$wgWhitelistRead と類似していますが、この変数は正規表現のリストを使用します。

This would be useful in a semi-public team wiki situation where one would want to hide everything except for an entire namespace from everyone.

This function will match the regexp against the title name, which is without underscore. Unless ^ and/or $ is specified, a regular expression might match pages not intended to be whitelisted.

This configuration parameter will only work if the following is set:

$wgGroupPermissions['*']['read'] = false;

Otherwise, all pages are accessible, regardless of this setting.

警告 警告: 本文の言語として英語以外を使用している場合は、特別ページの英語名ではなく翻訳後の名前を使用する必要がある場合があります。

Whitelist "Main Page" or "Security Main Page":

$wgWhitelistReadRegexp = [ "/Main Page/" ];

Allow reading any page starting with 'User' regardless of the case, e.g. "User is banned" and "User:JohnDoe":

$wgWhitelistReadRegexp = [ "@^UsEr.*@i" ];

Allow reading "Main Page" and all pages in namespace "Foo Bar":

$wgWhitelistReadRegexp = [
    '/Main Page/',
    '/Foo Bar:/'
    ];