Manual:ブロックとブロック解除

From mediawiki.org
This page is a translated version of the page Manual:Block and unblock and the translation is 39% complete.
Outdated translations are marked like this.

十分な特権を持つ利用者 (通常は 管理者) は、IP アドレス および利用者アカウントを、編集、ファイルのアップロード、ページの移動ができないようにブロックおよびブロック解除できます (ページの保護、保護解除、削除、復元のような権限が付与されている場合)。

MediaWiki handles blocks through an abstraction layer; extensions can add their own block types. The mechanism for creating/updating/removing blocks and how they are logged and listed are different for each block type; the mechanism for checking whether a user is blocked, preventing blocked actions and informing the user is unified.

Standard blocking interface

ブロックは、特別ページ Special:Block にあるフォームで適用できます。 ブロックは以下の段階で進めます:

  1. ブロックするIPアドレスまたは利用者を指定します。 ブロックしたいIPアドレス、またはブロックしたい登録済み利用者アカウントの利用者名を、フォームの「IPアドレス、利用者名またはブロックID:」欄に入力します。 存在しない利用者もブロックできることにご注意ください。そのため利用者名が正しいことを確認してください。 IP アドレスの範囲 (range) もブロックできます。手順は Help:範囲ブロック を参照してください。
  2. ブロックの範囲を設定します。 ブロック対象者に対して禁止したい行動を選択します。 サイト全体をブロックすると、ブロック対象者はウィキにあるすべてのページを編集できなくなり、部分的にブロックすると、ブロック対象者は特定のページや特定の名前空間にあるページを編集できなくなります。
  3. ブロックの期間を指定します。 「有効期限:」というラベルのドロップダウン ボックスからあらかじめ定義された期間を選択できます。「その他の期間」欄にGNU の標準書式を使用してカスタム値を入力することもできます。 期間を「無期限」にすると、管理者がIPアドレスまたは利用者をブロック解除しない限り、ブロックが期限切れになりません。
  4. ブロックの理由を指定します (省略可能)。 この理由は、ブロックされた利用者がページの編集を試みた際にその画面に表示されます。

ブロックを適用するには「この利用者をブロック」をクリックします。 ブロックはすべてブロック記録に記録され、現在有効なブロックはすべて有効なブロックの一覧に列挙されます。

さらに、Special:Block でのブロックしたい IP アドレスまたは利用者アカウントの手作業での入力について、IP アドレスまたは利用者アカウントの「利用者」または「利用者 トーク」ページを閲覧している際にサイドバー内のツールボックスから「この利用者をブロック」リンクをたどることでも手作業での入力を回避できます。 最近の更新の一覧またはページの履歴で、IP アドレスまたは利用者アカウント名の次の「ブロック」リンクをクリックすることでもブロックできます。

ブロックのオプション

MediaWiki バージョン:
1.8

MediaWiki バージョン 1.8 では、いくつかの追加のブロック オプションが追加され、ブロック フォームのチェックボックスにチェックを入れることで有効になります。

匿名利用者のみをブロック (別名 ソフトブロック)
このオプションは、IP アドレスをブロックする場合のブロックの効果を変更します。 有効にすると、その IP アドレスから編集している匿名利用者のみがブロックの対象となり、その IP アドレスから編集している登録利用者には影響がありません。 The option has no effect on a block of a registered user, but does on an autoblock caused by it.
アカウント作成をブロック
このオプションは、利用者または IP アドレスをブロックする際に、ブロックの効果を変更します。 有効にすると、ブロックが有効な間、その IP アドレスからの新規利用者アカウントの登録ができなくなります。 However, this can be bypassed by creating an account on another wiki and visiting the wiki where the block is active, as global accounts automatically create local accounts on wikis the first time they are visited by the user. However, the bypassing can be prevented by a global ban that prevents account creation.
この利用者が最後に使用した IP アドレスと、それ以降に編集を試みた IP アドレスを自動的にブロックします (「ハードブロック」とも呼ばれます)。
このオプションは、登録された利用者アカウントをブロックする際のブロックの効果を変更します。 有効にすると、アカウントが最近使用した IP アドレスと、その後アカウントが編集しようとした IP アドレスが自動的にブロックされます。

部分ブロック

MediaWiki バージョン:
1.33

MediaWiki 1.33 以降では、ブロック対象が、指定されたページおよび/または名前空間内のすべてのページに対してのみ変更を行うことを禁止できます。 ページが移動された場合、制限は新しいページ名に切り替わります。 Currently non-existent ("redlink") pages cannot be blocked, and setting multiple overlapping blocks with different expiration dates is not supported.

MediaWiki 1.33 と 1.34 では、部分ブロックは既定で無効になっています。 $wgEnablePartialBlocks = true を設定することで有効にできます。

MediaWiki バージョン:
1.35

Since MediaWiki 1.35, partial blocks are always enabled and cannot be disabled. You may hide partial blocks form elements by adding some JS or CSS to user or site common.js/common.css. これは、APIを介して設定される可能性のある部分ブロックを無効にするものではありません。

ブロック解除

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. これの既定値は false です。
  • 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.

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).

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-dropdown
  • wpReason-other - prepopulating "other reason" text field

フック

SQL

メインのページ: Manual:ipblocks table

All types of blocks are stored in the ipblocks table, not just IP blocks. 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:

  • User blocksWHERE ipb_user != 0
  • Auto blocksWHERE ipb_parent_block_id IS NULL OR ipb_parent_block_id = 0
  • Address blocksWHERE ipb_user != 0 OR ipb_range_end > ipb_range_start
  • Range blocksWHERE ipb_range_end = ipb_range_start
  • Partial blocksWHERE ipb_sitewide = 0
  • Blocks that are indefiniteWHERE ipb_expiry = 'infinity'
  • Blocks that expireWHERE ipb_expiry != 'infinity'

関連項目

Code stewardship