Help:Extension/Secret
From Metabolomics.JP
(Difference between revisions)
(Created page with "{{Extension |author=K, Suwa |version=0.1 }} __TOC__ ExMolFunctionsはMol名前空間にMOLデータを保存すると、自動的に組成式、精密質量、平均質量、SM...") |
|||
(3 intermediate revisions by one user not shown) | |||
Line 2: | Line 2: | ||
|author=K, Suwa | |author=K, Suwa | ||
|version=0.1 | |version=0.1 | ||
+ | |type=other | ||
}} | }} | ||
__TOC__ | __TOC__ | ||
− | + | mediawikiは細かな権限設定を行うことができません。また、権限はユーザ単位ではなくグループ単位でのみ設定可能です。 | |
− | + | Secretはユーザ単位、アクション毎、名前空間毎に権限を設定できます。例えば、ある名前空間は'WikiSysop'のみ閲覧可能にするなどです。 | |
− | + | ||
− | + | このextensionは[http://www.mediawiki.org/wiki/Manual:Hooks/userCan userCan]というフックを利用しています。 | |
+ | |||
+ | == Example == | ||
+ | Secret.phpの"/* Please write permission settings here"以下に次の2行を追加して下さい。 | ||
+ | |||
+ | if( $ns == NS_SPECIAL ) | ||
+ | $result = false; | ||
+ | |||
+ | この設定により、全ユーザは特別ページにアクセスできなくなります。 | ||
+ | |||
+ | <span style="color: red">※チェックが終わったら、この設定は削除して下さい。</span> | ||
Line 28: | Line 38: | ||
<li>Place it in the extensions/ directory.</li> | <li>Place it in the extensions/ directory.</li> | ||
<li>Insert the follow lines to LocalSettings.php | <li>Insert the follow lines to LocalSettings.php | ||
− | <pre>require_once( "$IP/extensions/ | + | <pre>require_once( "$IP/extensions/Secret.php" ); |
</pre> | </pre> | ||
<li>Secret.php内のisSecretPage関数に必要な処理を記述して下さい。</li> | <li>Secret.php内のisSecretPage関数に必要な処理を記述して下さい。</li> | ||
</ol> | </ol> |
Latest revision as of 14:21, 1 March 2011
Extension Information | |
Implementation | |
Description | |
Author(s) | K, Suwa |
Version | 0.1 |
MediaWiki | |
License | |
Hooks used | |
Token type | other |
Contents |
mediawikiは細かな権限設定を行うことができません。また、権限はユーザ単位ではなくグループ単位でのみ設定可能です。
Secretはユーザ単位、アクション毎、名前空間毎に権限を設定できます。例えば、ある名前空間は'WikiSysop'のみ閲覧可能にするなどです。
このextensionはuserCanというフックを利用しています。
[edit] Example
Secret.phpの"/* Please write permission settings here"以下に次の2行を追加して下さい。
if( $ns == NS_SPECIAL ) $result = false;
この設定により、全ユーザは特別ページにアクセスできなくなります。
※チェックが終わったら、この設定は削除して下さい。
[edit] Requirements
None
[edit] Download
version | source | md5 | OperationCheck version |
0.1(December 9,2009) | Secret.phps | c45d54c9ddff0a9f10964b4b3d1e6562 | 1.11.1, 1.16.2 |
[edit] Installtion
- Download the source code and rename it to Secret.php.
- Place it in the extensions/ directory.
- Insert the follow lines to LocalSettings.php
require_once( "$IP/extensions/Secret.php" );
- Secret.php内のisSecretPage関数に必要な処理を記述して下さい。