Manual:Bloquear e Desbloquear

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

Os administradores de sistema podem bloquear e desbloquear endereços de IP (e contas de utilizador registadas se o bloqueio do nome de utilizador estiver ativado) para editar, enviar ficheiros, mover páginas, e, se lhes foi concedido tais privilégios, desproteger/desproteger e eliminar/restaurar páginas.

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.

Os bloqueios são aplicados no formulário da página especial de Special:Block. Existem vários passos para aplicar um bloqueio:

  1. Especificar o endereço de IP ou o utilizador para ser bloqueado. Insira o endereço de IP, ou o nome da conta do utilizador registado para ser bloqueado, no campo "Endereço IP, nome de utilizador ou identificador do bloqueio:" do formulário. Os nomes de utilizador não existentes também podem ser bloqueadas, por isso certifique-se que tem o nome de utilizador correto. Também pode bloquear um intervalo de endereços de IP, consulte Ajuda:Bloqueios por Intervalo de IP para instruções.
  2. Especificar os parâmetros para o bloqueio. Select the actions that the block target should be prevented from completing. A Em todo o site block prevents the block target from editing all pages on the wikis, while a Parcial block prevents the block target from editing the specified pages and/or pages inside the specified namespaces.
  3. Especificar uma duração para o bloqueio. Pode selecionar uma duração predefinida no menu suspenso denominado "Expiração:", ou pode inserir um valor personalizado, utilizando o formato padrão de GNU, no campo "Outro tempo". Se a duração dada é "indefinido", então o bloqueio não expirará, apesar de que a direcção IP ou a conta de usuário ainda podem ser desbloqueadas manualmente por um administrador.
  4. Especificar um motivo para o bloqueio (opcional). Este motivo será exibido para o utilizador bloqueado se este tentar editar uma página.

Clique em "Bloquear este utilizador" para aplicar o bloqueio. Todos os bloqueios são registados no registo de bloqueios, e todos os bloqueios atualmente ativos são listados na lista de bloqueios ativos.

Tenha em conta que, além de introduzir manualmente a direcção IP ou a conta de usuário em Special:Block, também pode seguir o enlace de "Bloquear este utilizador" desde a caixa de ferramentas na varra lateral quando veja a página "Usuário" ou "Usuário Discussão" da direcção IP ou da conta de usuário. Podes fazer também clique no enlace de "bloquear" seguindo a uma direcção IP ou nome de conta de usuário na pronta de mudanças recentes ou o historial da página.

Opções de bloqueio

Versão MediaWiki:
1.8

Várias opções de bloqueio extra foram adicionadas na versão 1.8 do MediaWiki, que são ativadas selecionado a caixa de marcação no formulário de bloqueio.

Bloquear apenas os utilizadores anónimos (também denominado softblocking)
Esta opção altera o efeito de um bloqueio quando bloquear um endereço de IP. Quando está habilitado, o bloqueio só afectará aos usuários anónimos que editam desde essa direcção IP; os usuários registados que editam desde essa direcção IP não ver-se-ão afectados. The option has no effect on a block of a registered user, but does on an autoblock caused by it.
Bloquear criação de conta
Esta opção altera o efeito de um bloqueio quando bloquear um utilizador ou um endereço de IP. When it is enabled, the registration of new user accounts from that IP address will be disabled while the block is in effect. 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.
Automatically block the last IP address used by this user, and any subsequent addresses they try to edit from (also called hardblocking)
This option changes the effect of a block when blocking a registered user account. When it is enabled, the IP address most recently used by the account, and any IP addresses that the account subsequently attempts to edit from will be automatically blocked.

Partial blocks

Versão MediaWiki:
1.33

Since MediaWiki 1.33, it is possible to prohibit the block target from making changes only to the specified pages and/or all pages in namespaces. If a page is moved, the restriction will be switched to the new title. Currently non-existent ("redlink") pages cannot be blocked, and setting multiple overlapping blocks with different expiration dates is not supported.

In MediaWiki 1.33 and 1.34, partial block is disabled by default. It may be enabled by setting $wgEnablePartialBlocks = true.

Versão 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. This does not disable partial blocks which may still be set via API.

Desbloquear

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 "Procurar um utilizador bloqueado" field to help you find the entry), and click the "desbloquear" link displayed to the right of the block's expiry time.

This will lead you to a confirmation page. Enter the reason for unblocking (optional) in the "Motivo:" field, and click "Remover este bloqueio" to remove the block. All unblockings are recorded in the block log.

Note that if a range is blocked, then the unblock must cover the whole range to be effective. Attempting to unblock an individual IP address in the range will not be effective.

Efeitos de estar bloqueado

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.

On other wikis, blocked users may still read pages, but they may not create, edit or move pages, or upload files. 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.

Definições de configuração relacionadas com o bloqueio

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. This is currently (1.26+) true by default. 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. This is false by default.
  • $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. This is enabled by default.
  • 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).

Versão 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

Parâmetros de URL

Versão MediaWiki:
1.18

Especial:Bloquear aceita alguns parâmetros de URL para povoar o formulário HTML:

  • wpTarget - nome de utilizador / endereço de IP
  • wpEditingRestriction - o tipo de restrição de bloqueio (=sitewide ou =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:Block for a list of blockable namespace IDs)
  • wpExpiry - tempo de expiração
  • wpAutoBlock - definição de bloquear automático (=1 ou =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

Hooks

SQL

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'

Ver também

Code stewardship