aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-01-14 15:48:22 +0000
committerGareth Rees <gareth@mysociety.org>2015-04-07 16:25:05 +0100
commit8b71621def574eb49a45f95c3de7e1e74bf34b4c (patch)
treeeebe6071712b36b0d9444b84218fb9218932edaf
parent9f15380c1a8d9922b6d19c38f42ccb3ecd1cda4f (diff)
Add Spanish docs/running/redaction
-rw-r--r--docs/running/redaction.md18
-rw-r--r--es/docs/running/redaction.md135
2 files changed, 144 insertions, 9 deletions
diff --git a/docs/running/redaction.md b/docs/running/redaction.md
index 6ab8fed86..1e6542873 100644
--- a/docs/running/redaction.md
+++ b/docs/running/redaction.md
@@ -7,7 +7,7 @@ title: Redacting Sensitive Information
In some countries, local requirements mean that requests need to contain personal information such as the address or ID number of the person asking for information. Usually requesters do not want this information to be displayed to the general public.
-Alaveteli has some ability to deal with this through the use of <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rules</a>.
+Alaveteli has some ability to deal with this through the use of <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rules</a>.
The [theme](https://github.com/mysociety/derechoapreguntar-theme) we'll use as an example requires a National Identity Card Number and what's known as General Law in Nicaragua (Date of Birth, Domicile, Occupation and Marital Status).
@@ -30,13 +30,13 @@ When a request is made the user's ID Number is now added to the footer of the ou
![Outgoing Message with ID Number]({{ site.baseurl }}assets/img/redaction-outgoing-message-with-id-number.png)
-At this point we haven't added any <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rules</a>. When the authority replies it is unlikely that the responder will remove the quoted section of the email:
+At this point we haven't added any <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rules</a>. When the authority replies it is unlikely that the responder will remove the quoted section of the email:
![ID Number in Quoted Section]({{ site.baseurl }}assets/img/redaction-id-number-in-quoted-section.png)
-We could add a <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> for the individual request, but as every request will contain a user's ID Number its better to add some code to do do it automatically.
+We could add a <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> for the individual request, but as every request will contain a user's ID Number its better to add some code to do do it automatically.
-To illustrate this we'll patch the `User` model with a callback that creates a <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> when the user is created and updated.
+To illustrate this we'll patch the `User` model with a callback that creates a <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> when the user is created and updated.
# THEME_ROOT/lib/model_patches.rb
User.class_eval do
@@ -54,7 +54,7 @@ To illustrate this we'll patch the `User` model with a callback that creates a <
end
end
-You can see the new <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> in the admin interface:
+You can see the new <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> in the admin interface:
![Automatically added Censor Rule]({{ site.baseurl }}assets/img/redaction-automatically-added-id-number-censor-rule.png)
@@ -66,9 +66,9 @@ It also gets redacted if the public body use the ID Number in the main email bod
![ID Number redacted in main body]({{ site.baseurl }}assets/img/redaction-id-number-in-main-body-redacted.png)
-A <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">censor rule</a> added to a user only gets applied to correspondence on requests created by that user. It does not get applied to annotations made by the user.
+A <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">censor rule</a> added to a user only gets applied to correspondence on requests created by that user. It does not get applied to annotations made by the user.
-**Warning:** Redaction in this way requires the sensitive text to be in exactly the same format as the <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a>. If it differs even slightly, the redaction can fail. If the public body was to remove the hyphens from the number it would not be redacted:
+**Warning:** Redaction in this way requires the sensitive text to be in exactly the same format as the <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a>. If it differs even slightly, the redaction can fail. If the public body was to remove the hyphens from the number it would not be redacted:
![ID Number not redacted in main body]({{ site.baseurl }}assets/img/redaction-id-number-in-main-body-not-redacted.png)
@@ -102,7 +102,7 @@ Note that the information is now contained in a specially formatted block of tex
![Outgoing message with general law]({{ site.baseurl }}assets/img/redaction-outgoing-message-with-general-law.png)
-This allows a <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> to match the special formatting and remove anything contained within. This <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> is global, so it will act on matches in all requests.
+This allows a <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> to match the special formatting and remove anything contained within. This <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> is global, so it will act on matches in all requests.
# THEME_ROOT/lib/censor_rules.rb
# If not already created, make a CensorRule that hides personal information
@@ -126,7 +126,7 @@ In this case the authority has revealed the user's Date of Birth and Domicile:
![Address outside formatted block]({{ site.baseurl }}assets/img/redaction-address-outside-fence.png)
-Its really difficult to add a <a href="{{site.baseurl}}docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> to remove this type of information. One suggestion might be to remove all mentions of the user's Date of Birth, but you would have to account for [every type of date format](http://en.wikipedia.org/wiki/Calendar_date#Date_format). Likewise, you could redact all occurrences of the user's Domicile, but if they a question about their local area (very likely) the request would become unintelligible.
+Its really difficult to add a <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">Censor Rule</a> to remove this type of information. One suggestion might be to remove all mentions of the user's Date of Birth, but you would have to account for [every type of date format](http://en.wikipedia.org/wiki/Calendar_date#Date_format). Likewise, you could redact all occurrences of the user's Domicile, but if they a question about their local area (very likely) the request would become unintelligible.
![Censor Rule to redact a user's Domicile]({{ site.baseurl }}assets/img/redaction-domicile-censor-rule.png)
diff --git a/es/docs/running/redaction.md b/es/docs/running/redaction.md
new file mode 100644
index 000000000..373eab247
--- /dev/null
+++ b/es/docs/running/redaction.md
@@ -0,0 +1,135 @@
+---
+layout: es/page
+title: Edición de información delicada
+---
+
+# Edición de información delicada
+
+En algunos países los requisitos locales exigen que las solicitudes contengan datos personales, tales como la dirección o el número del documento de indentidad de la persona que solicita la información. Normalmente los solicitantes no desean que esta información se muestre de forma pública.
+
+Alaveteli tiene cierta habilidad para gestionar estos datos mediante el uso de <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">normas de censura</a>.
+
+El [tema](https://github.com/mysociety/derechoapreguntar-theme) que utilizaremos como ejemplo requiere el número del documento nacional de identidad y lo que se conoce como ley general en Nicaragua (fecha de nacimiento, domicilio, profesión y estado civil).
+
+![Formulario de registro con detalles adicionales]({{ site.baseurl }}assets/img/redaction-sign-up-form.png)
+
+## Número del documento de identidad
+
+Empezaremos mirando el número del documento nacional de identidad. Este un buen ejemplo de un concepto cuya edición resulta sencilla. Es único para cada usuario y cuenta con un formato específico comprobable.
+
+Para enviar el número del documento de identidad a la autoridad, sobrescribiremos [la plantilla inicial de solicitud](https://github.com/mysociety/alaveteli/blob/master/app/views/outgoing_mailer/initial_request.text.erb) (fragmento de código recortado):
+
+ <%= raw @outgoing_message.body.strip %>
+
+ -------------------------------------------------------------------
+
+ <%= _('Requestor details') %>
+ <%= _('Identity Card Number') %>: <%= @user_identity_card_number %>
+
+Ahora, al efectuar una solicitud, se añade el número del documento de identidad del usuario al pie del correo saliente.
+
+![Mensaje saliente con el número del documento de identidad]({{ site.baseurl }}assets/img/redaction-outgoing-message-with-id-number.png)
+
+En este punto no hemos añadido ninguna <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a>. Cuando la autoridad responde es poco probable que elimine el texto citado del correo electrónico:
+
+![Número del documento de identidad en el texto citado]({{ site.baseurl }}assets/img/redaction-id-number-in-quoted-section.png)
+
+Podríamos añadir una <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> para la solicitud individual pero, ya que cada solicitud incluirá un número de documento de identidad, es mejor añadir algo de código para que se edite automáticamente.
+
+Para ilustrar este ejemplo, aplicaremos un parche al modelo `User` con una retrollamada que crea una <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> cuando se crea o actualiza un usuario.
+
+ # THEME_ROOT/lib/model_patches.rb
+ User.class_eval do
+ after_save :update_censor_rules
+
+ private
+
+ def update_censor_rules
+ censor_rules.where(:text => identity_card_number).first_or_create(
+ :text => identity_card_number,
+ :replacement => _('REDACTED'),
+ :last_edit_editor => THEME_NAME,
+ :last_edit_comment => _('Updated automatically after_save')
+ )
+ end
+ end
+
+Puede ver la nueva <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> en la interfaz de administración:
+
+![Norma de censura añadida automáticamente]({{ site.baseurl }}assets/img/redaction-automatically-added-id-number-censor-rule.png)
+
+Ahora el número del documento de identidad se edita:
+
+![Número del documento de identidad editado automáticamente]({{ site.baseurl }}assets/img/redaction-id-number-redacted.png)
+
+También se edita si el organismo público utiliza el número del documento de identidad en el cuerpo del correo:
+
+![Número del documento de identidad editado en el cuerpo principal]({{ site.baseurl }}assets/img/redaction-id-number-in-main-body-redacted.png)
+
+Una <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> añadida a un usuario solo se aplica en la correspondencia de solicitudes creadas por dicho usuario. No se aplica a anotaciones realizadas por el usuario.
+
+**Advertencia:** La edición de este tipo requiere que el texto delicado se encuentre exactamente en el mismo formato que la <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a>. Si es mínimamente diferente, es posible que la edición falle. Si el organismo público eliminase los guiones del número, este no se editaría:
+
+![Número del documento de identidad no editado en el cuerpo principal]({{ site.baseurl }}assets/img/redaction-id-number-in-main-body-not-redacted.png)
+
+**Advertencia:** Alaveteli también intenta editar el texto de todos los adjuntos. Solo puede hacerlo si detecta la cadena de texto exacta, que no suele ser posible con formatos binarios como PDF o Word.
+
+Alaveteli puede normalmente editar la información delicada al convertir un documento de texto o en formato PDF a HTML:
+
+![Edición de PDF a HTML]({{ site.baseurl }}assets/img/redaction-pdf-redaction-as-html.png)
+
+Este PDF no contiene la cadena de texto en el formato binario, así que la edición _no_ se aplica al descargar el documento PDF original:
+
+![Descarga del PDF original]({{ site.baseurl }}assets/img/redaction-pdf-redaction-download.png)
+
+## Ley general
+
+La información de la ley general es mucho más difícil de editar automáticamente. No está tan estructurada y es poco probable que sea única (por ejemplo, domicilio: Londres).
+
+Añadiremos la información de la ley general a la [plantilla inicial de solicitud](https://github.com/mysociety/alaveteli/blob/master/app/views/outgoing_mailer/initial_request.text.erb) del mismo modo que el número del documento de identidad:
+
+ <%= _('Requestor details') %>:
+ <%-# !!!IF YOU CHANGE THE FORMAT OF THE BLOCK BELOW, ADD A NEW CENSOR RULE!!! -%>
+ ===================================================================
+ # <%= _('Name') %>: <%= @user_name %>
+ # <%= _('Identity Card Number') %>: <%= @user_identity_card_number %>
+ <% @user_general_law_attributes.each do |key, value| %>
+ # <%= _(key.humanize) %>: <%= value %>
+ <% end %>
+ ===================================================================
+
+Ahora la información está contenida en un bloque de texto con un formato especial.
+
+![Mensaje saliente con la ley general]({{ site.baseurl }}assets/img/redaction-outgoing-message-with-general-law.png)
+
+Así se permite que una <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> concuerde con el formato especial y elimine todo lo que se halle en su interior. Esta <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> es general, así que actuará en las coincidencias de todas las solicitudes.
+
+ # THEME_ROOT/lib/censor_rules.rb
+ # If not already created, make a CensorRule that hides personal information
+ regexp = '={67}\s*\n(?:[^\n]*?#[^\n]*?: ?[^\n]*\n){3,10}[^\n]*={67}'
+
+ unless CensorRule.find_by_text(regexp)
+ Rails.logger.info("Creating new censor rule: /#{regexp}/")
+ CensorRule.create!(:text => regexp,
+ :allow_global => true,
+ :replacement => _('REDACTED'),
+ :regexp => true,
+ :last_edit_editor => THEME_NAME,
+ :last_edit_comment => 'Added automatically')
+ end
+
+![Dirección editada encuadrada]({{ site.baseurl }}assets/img/redaction-address-quoted-redacted.png)
+
+**Advertencia:** La edición de información desestructurada es una aproximación muy delicada, pues se apoya en que las autoridades siempre citen el texto completo.
+
+En tal caso la autoridad ha revelado la fecha de nacimiento y el domicilio del usuario:
+
+![Dirección fuera del bloque con formato]({{ site.baseurl }}assets/img/redaction-address-outside-fence.png)
+
+Es realmente difícil añadir una <a href="{{ page.baseurl }}/docs/glossary/#censor-rule" class="glossary__link">norma de censura</a> para eliminar este tipo de información. Una sugerencia puede ser eliminar todas las menciones de la fecha de nacimiento del usuario, pero debería tener en cuenta [todos los tipos de formato de fecha](http://en.wikipedia.org/wiki/Calendar_date#Date_format). Probablemente podría editar todas las apariciones del domicilio del usuario, pero si se trata de una solicitud relacionada con su región, es muy probable que esta se volviera incomprensible.
+
+![Norma de censura para editar el domicilio del usuario]({{ site.baseurl }}assets/img/redaction-domicile-censor-rule.png)
+
+La edición se ha aplicado, pero no hay forma de conocer el contexto en que se utiliza una palabra delicada.
+
+![Norma de censura para editar el domicilio del usuario]({{ site.baseurl }}assets/img/redaction-domicile-censor-rule-applied.png)