Manual:Block and unblock/ja
特殊な権限を持つ一部の利用者(通常は管理者)は、IPアドレスや利用者アカウントに対して、特定の操作を行えないようにブロックしたり、そのブロックを解除したりできます。ブロックの対象となる操作には、編集、ファイルのアップロード、ページの移動などがあります。また、対象の利用者も同等の権限を有している場合には、ページの保護・保護解除、削除・復元といった操作も規制対象となります。
MediaWikiでは、抽象化レイヤーを通じてブロックを管理しており、拡張機能によって独自のブロック種別を追加することもできます。 ブロックの作成・更新・解除の仕組みや、それぞれの記録・一覧表示の方法は、ブロックの種別ごとに異なります。一方で、利用者のブロック状態の判定、制限される操作の管理、通知の表示といった処理は、共通の仕組みによって行われます。
標準的なブロック操作インターフェース
MediaWikiコアのブロックは、特別ページ「Special:Block」にあるフォームを通じて適用されます。 ブロックを適用するには、いくつかの手順があります:
- ブロックするIPアドレスまたは利用者名を指定します。 フォームの「IPアドレス、利用者名またはブロックID:」欄に、ブロックするIPアドレスまたは登録利用者のアカウント名を入力します。 存在しない利用者に対してもブロックは適用可能なため、利用者名が正しいことをこの時点で確認してください。 対象がIPアドレスの場合、複数のIPアドレスを含む「レンジ」をブロックすることもできます。(手順はHelp:範囲ブロック を参照してください。)
- ブロックの詳細を設定します。 ブロック対象に対して禁止する操作を選択します。 サイト全体ブロックは、ブロック対象がウィキ内のすべてのページを編集することを禁止します。一方、部分的ブロックは、指定されたページおよび/または指定された名前空間内のページのみを編集できないようにします。
- ブロックの期間を指定します。 「有効期限」のドロップダウンボックスからあらかじめ設定された期間を選択するか、「その他の時間」欄にGNU標準形式で任意の期間を入力してください。 期間に「無期限」を指定した場合、ブロックは自動解除されません。ただし、管理者が手動でブロックを解除することは可能です。
- ブロック理由を指定します (省略可能)。 この理由は、ブロック対象の利用者がページの編集を試みた際に表示されます。
ブロックを適用するには「ブロックを追加」をクリックします。 適用されたすべてのブロックはブロックログに記録され、現在有効なすべてのブロックは有効なブロック一覧に列挙されます。
Special:Blockにブロック対象のIPアドレスや利用者アカウントを手動で入力する方法に加えて、そのIPアドレスまたは利用者の利用者ページや会話ページを表示中に、サイドバーのツールボックスにある「ブロックを追加」リンクからブロックを設定することもできます。 最近の更新やページの履歴上では、投稿者のIPアドレスまたは利用者名の横にある「ブロック」リンクからもブロックを行うことができます。
ブロック設定
MediaWiki バージョン: | ≧ 1.8 |
MediaWikiバージョン1.8から、より詳細なブロック設定が可能になりました。これらは、ブロックフォーム上で該当オプションにチェックをすることで適用されます。
- アカウント作成をブロック
- このオプションは、登録利用者またはIPアドレスに対するブロックの効果を変更します。 有効にすると、ブロックの有効期間中、対象のアカウントまたはIPアドレスからの新規アカウント作成を無効化します。 ただし、別のウィキでアカウントを作成し、その後ブロックが有効なウィキにアクセスすることで、このブロックを回避することが可能です。これは、グローバルアカウント管理において、利用者が初めてアクセスしたウィキ上でローカルアカウントが自動的に作成される仕組みになっているためです。 この回避手段は、アカウント作成を禁止するように設定されたグローバルブロックによって防ぐことができます。
- メール送信をブロック
- このオプションは、ブロックされた利用者がSpecial:EmailUserのインターフェースを使用できないようにします。 これは、ブロック中にウィキメールシステムが悪用されるのを防ぐために使用されます。 このブロック設定は、メールアドレスを認証済みの登録利用者にのみ影響します。
- 会話ページへのアクセスをブロック
- このオプションを有効にすると、ブロックされた利用者またはIPアドレスは自身の利用者会話ページを編集できなくなります。 この設定は、会話ページの不適切な使用が繰り返される場合や、生産的なやり取りが期待できない場合に使用されます。
- この利用者が最後に使用したIPアドレスおよびその後に使用を試みたIPアドレスを自動的にブロック(通称「自動ブロック」)
- このオプションは、登録利用者に対するブロックの効果を変更します。 有効にすると、そのアカウントが直近に使用したIPアドレスおよび、その後に編集を試みた際の接続元IPアドレスが自動的にブロックされます。
- このIPアドレスを使用しているログイン利用者にもブロックを適用(通称「ハードブロック」)
- このオプションは、IPアドレスに対するブロックの効果を変更します。 有効にすると、そのIPアドレスから編集している登録利用者にもブロックが適用されます。
- このオプションを無効にすると、ブロックの対象は匿名利用者のみに限定されます(通称「ソフトブロック」)。 ソフトブロックは登録利用者には影響しませんが、その IP アドレスから接続された仮アカウントおよびそれに基づいて設定される自動ブロックには影響します。
部分ブロック
MediaWiki バージョン: | ≧ 1.33 |
MediaWiki 1.33以降、ブロック対象に対して、特定のページや特定の名前空間内のページのみの編集を禁止することが可能になりました。 ページが移動された場合、制限は自動的に新しいページに引き継がれます。 現在のところ、存在しない(いわゆる「赤リンク」)ページはブロック対象に指定できません。また、有効期限が異なる複数の重複ブロックを設定することはできません。
MediaWiki 1.33および1.34では、部分ブロックは既定で無効になっています。
有効にするには、$wgEnablePartialBlocks = true
を設定してください。
MediaWiki バージョン: | ≧ 1.35 |
MediaWiki 1.35以降では、部分ブロックは常に有効化されており、無効にすることはできません。 利用者またはサイトcommon.js/common.cssにJavaScriptやCSSを追加することで、部分ブロック関連のフォーム要素を非表示にすることは可能です。 ただし、これは部分ブロック機能そのものを無効化するものではなく、API経由での部分ブロックの設定は依然として可能です。
Multiple blocks
MediaWiki バージョン: | ≧ 1.44 |
Since MediaWiki 1.44 with $wgEnableMultiBlocks set, sysops can add multiple layered blocks to the same target – a feature known as "multiblocks". See Help:Manage blocks for more information.
ブロック解除
An IP address or registered user account can be unblocked via the list of active blocks. Find the IP address or registered user account you wish to unblock in the list (you can enter the address or name in the "ブロックされている利用者の検索" field to help you find the entry), and click the "ブロック解除" link displayed to the right of the block's expiry time.
これにより確認ページに遷移します。 ブロック解除する理由を「理由:」欄に入力し (省略可能)、「このブロックを解除」をクリックしてブロックを解除します。 ブロック解除は、すべてブロック記録に記録されます。
範囲がブロックされている場合は、その範囲全体のブロック解除のみ有効であることにご注意ください。 ブロックされている範囲内の個別の IP アドレスを、ブロック解除しようと試みても効果はありません。
ブロックの効果
When $wgBlockDisablesLogin
is enabled, blocked users are locked out of their account entirely.
This is mainly meant for private wikis which need a mechanism to revoke reading privileges once a user is not active anymore.
ブロックされた利用者はページを読むことはできますが、ページの作成、編集、移動、ファイルのアップロードはできない場合があります。
Partially blocked users may not edit the particular pages or namespaces specified in their block, but may create, edit or move other pages, and may upload files.
Users with certain other user rights may not be able to use those rights when they are blocked, depending on their block.
For example, users with the rights to delete and undelete or protect and unprotect pages will not be able to do so if they are sitewide blocked.
If they are partially blocked, then for any page they are not blocked from, they will still be able to perform these actions.
However, users with the rights to block and unblock users will still be able to do so when they are blocked. Unblocking your own account requires the extra right unblockself
; by default all sysops have this but on large wikis it might make sense to remove it to make potential account takeovers less disruptive.
Users who are blocked and attempt to edit a page (or move a page, or upload a file) will see the "Your account or IP address has been blocked" message informing them that they have been blocked.
If the autoblock option has been enabled with respect to a block, and the blocked user attempts to edit (or move a page, or upload a file), the IP address being used by that user will also be blocked.
Configuration settings related to blocking
The configuration options below can be set in LocalSettings.php and can be used to enable or disable certain aspects of the blocking interface.
$wgAutoblockExpiry
- controls how many seconds need to pass until a block on an "autoblocked" IP address will expire. The default is 86400 seconds (one day)$wgBlockAllowsUTEdit
- controls whether or not a blocked user is able to edit their own user talk page. 現在 (1.26以降)、これの既定値は true です。 The ability to disable the ability of a blocked user to edit their own user talk page, when this variable is true, is an option available in Special:Block.- The blockemail user right controls the ability for sysops to prevent users from using the Special:EmailUser interface.
$wgBlockDisablesLogin
- controls if blocked users will be prevented from logging in. これの既定値は false です。$wgCookieSetOnAutoblock
- (1.29+) determines whether to set a cookie when a user is autoblocked. Doing so means that a blocked user, even after logging out and moving to a new IP address, will still be blocked. これは既定で有効です。- The hideuser user right controls the ability for sysops to prevent a blocked user from appearing in the block log, the active block list, and the user list.
$wgEnableMultiBlocks
- (1.44+) allows sysops to create multiple layered blocks per target with the new manage blocks interface.
Default block duration options
To change the default options listed in the "Expiration" drop-down menu, edit the page MediaWiki:ipboptions.
The options are stored as a comma-separated list of "label:value" strings, for example 6 hours:6 hours,infinite:infinite
.
To have three options listed in Spanish, the page could include 6 horas:6 hours,2 días:2 days,para siempre:infinite
.
The default duration is "other".
To specify another default duration, edit the page MediaWiki:ipb-default-expiry and enter the value you want.
Note that you must write the value and not the label, if you were using the Spanish example listed above, MediaWiki:ipb-default-expiry should be infinite
(the value) and not para siempre
(the label).
MediaWiki バージョン: | ≧ 1.35 |
To specify a default duration for anonymous users, edit the page MediaWiki:ipb-default-expiry-ip and enter the value you want.
Using the Spanish example listed above, you could write 2 days
(the value) but not 2 días
(the label).
MediaWiki バージョン: | ≧ 1.45 |
To specify a default duration for temporary accounts, edit the page MediaWiki:ipb-default-expiry-temporary-account and enter the value you want.
Interface messages
URL パラメーター
MediaWiki バージョン: | ≧ 1.18 |
Special:Block accepts some URL parameters to prepopulate the HTML form:
wpTarget
- 利用者名/IP アドレスwpEditingRestriction
- the type of block restriction (=sitewide or =partial)wpPageRestrictions
- the pages to block (only applies for partial blocks; separate multiple pages with %0A; maximum 10 pages)wpNamespaceRestrictions
- IDs of the namespaces to block (only applies for partial blocks; separate multiple namespaces with %0A; see API:ブロック for a list of blockable namespace IDs)wpExpiry
- 有効期限wpAutoBlock
- autoblock setting (=1 or =0)wpHardBlock
- hard block setting (=1 or =0)wpCreateAccount
- prevent account creation (=1 or =0)wpReason
- reason, from selection of MediaWiki:Ipbreason-dropdownwpReason-other
- prepopulating "other reason" text field
MediaWiki バージョン: | ≧ 1.44 |
In MediaWiki 1.44 with multiblocks enabled, Special:Block takes these additional parameters:
id
- The ID of the block to modifyremove
- Whether the block is to be removed (=1 or =0). This requires thatid
also be set
フック
- BlockIp - occurs whenever the software receives a request to block an IP address or user
- BlockIpComplete - occurs after the request to block an IP or user has been processed
- UnblockUser , UnblockUserComplete - like BlockIp/BlockIpComplete, for unblocking
- AbortAutoblock - occurs when creating an autoblock, allows extensions to cancel
- PerformRetroactiveAutoblock - similar to AbortAutoblock but called when doing a retroactive autoblock (when performing a block, also autoblocking the user's last used IP)
- GetUserBlock - when the software checks for blocks, can be used to modify existing blocks or implement new types of blocks
- UserIsBlockedFrom - can be used by extensions which reimplement user talk pages in some way (e.g. Extension:LiquidThreads ) to honor the "allow the user to edit their own talk page" flag
- UserIsBlockedGlobally - similar to GetUserBlock, but for global blocks (which are for historical reasons handled separately)
- OtherBlockLogLink , OtherAutoblockLogLink - allows cross-linking Special:BlockList and Special:AutoblockList respectively with similar special pages provided by extensions
- SpecialBlockModifyFormFields - allows modifying the core Special:Block form
SQL
All types of blocks are stored in the block
table.
Older versions of MediaWiki (before 1.42) used the ipblocks
table instead, but stored user account blocks there as well.
Only currently active blocks are stored here.
To see old blocks, check the logging
table.
ipb_address
is a string and can be a username, an IP address, or blank.
ipb_user
contains the user_id
of the blocked user.
Here is how to filter for different kinds of blocks:
- The data on who was blocked is stored in the block_target table, keyed by
bl_target_id
.- User blocks –
WHERE bt_user != 0
- IP address blocks –
WHERE bt_user IS NULL AND bt_range_end = ''
- IP address range blocks –
WHERE bt_range_end != ''
- User blocks –
- Who blocked them?
- Auto blocks –
WHERE bl_parent_block_id IS NULL OR bl_parent_block_id = 0
- Admin blocks –
WHERE bl_by_actor = 1234
(replace number with user ID of the blocking admin)
- Auto blocks –
- What are they blocked from?
- Partial blocks –
WHERE bl_by_actor = 0
- Full blocks (not a partial block) –
WHERE bl_by_actor = 1
- Partial blocks –
- How long are they blocked?
- Blocks that are indefinite –
WHERE bl_expiry = 'infinity'
- Blocks that expire –
WHERE bl_expiry != 'infinity'
- Blocks that are indefinite –
関連項目
- Help:利用者のブロック
- Manual:Block abstraction layer for writing blocking extensions or other code that interacts with blocks
- Extensions implementing new block types:
- Extension:GlobalBlocking - for allowing multi-wiki blocking of IP addresses and ranges
- Extension:TorBlock - automatically block Tor exit nodes
- Extension:RegexBlock - allow blocking by username patterns
Code stewardship
- 信頼と安全製品 が保守しています。
- 問題点追跡: Phabricator MediaWiki-Blocks (問題点を報告)