aboutsummaryrefslogtreecommitdiffstats
path: root/docs/running
diff options
context:
space:
mode:
Diffstat (limited to 'docs/running')
-rw-r--r--docs/running/admin_manual.md187
-rw-r--r--docs/running/index.md7
-rw-r--r--docs/running/redaction.md135
-rw-r--r--docs/running/security.md36
-rw-r--r--docs/running/upgrading.md87
5 files changed, 401 insertions, 51 deletions
diff --git a/docs/running/admin_manual.md b/docs/running/admin_manual.md
index 567e6cf5e..d166cb859 100644
--- a/docs/running/admin_manual.md
+++ b/docs/running/admin_manual.md
@@ -13,6 +13,35 @@ title: Administrator's guide
href="https://www.whatdotheyknow.com">whatdotheyknow.com</a>.
</p>
+In this guide:
+
+<ul class="toc">
+ <li><a href="#whats-involved">What's involved?</a></li>
+ <li><a href="#user-support">User support</a>
+ <ul>
+ <li><a href="#dealing-with-email-thats-not-getting-through-to-the-authority">Dealing with email that's not getting through to the authority</a></li>
+ <li><a href="#requests-to-take-down-information">Requests to take down information</a></li>
+ <li><a href="#incorrectly-addressed">Incorrectly addressed</a></li>
+ <li><a href="#wants-advice">Wants advice</a></li>
+ <li><a href="#general-assistance-required">General assistance required</a></li>
+ <li><a href="#vexatious-users">Vexatious users</a></li>
+ <li><a href="#mail-import-errors">Mail import errors</a></li>
+ </ul>
+ <li><a href="#maintenance">Maintenance</a></li>
+ <ul>
+ <li><a href="#administrator-privileges-and-accessing-the-admin-interface">Administrator privileges and accessing the admin interface</a></li>
+ <li><a href="#removing-a-message-from-the-holding-pen">Removing a message from the 'Holding Pen'</a></li>
+ <li><a href="#editing-and-uploading-public-body-email-addresses">Editing and uploading public body email addresses</a></li>
+ <li><a href="#banning-a-user">Banning a user</a></li>
+ <li><a href="#deleting-a-request">Deleting a request</a></li>
+ <li><a href="#hiding-a-request">Hiding a request</a></li>
+ <li><a href="#hiding-an-incoming-or-outgoing-message">Hiding an incoming or outgoing message</a></li>
+ <li><a href="#editing-an-outgoing-message">Editing an outgoing message</a></li>
+ <li><a href="#hiding-certain-text-from-a-request-using-censor-rules">Hiding certain text from a request</a></li>
+ </ul>
+ </li>
+</ul>
+
## What's involved?
The overhead in managing a successful FOI website is quite high. Richard, a
@@ -24,7 +53,7 @@ WhatDoTheyKnow usually has about 3 active volunteers at any one time managing
the support, plus a few other less active people who help out at different
times.
-Administration tasks can be split into **maintenance** and **user support**.
+Administration tasks can be split into [**maintenance**]({{ site.baseurl }}docs/running/admin_manual/#maintenance) and [**user support**]({{ site.baseurl }}docs/running/admin_manual/#user-support).
The boundaries of these tasks is in fact quite blurred; the main distinction is
that the former happen exclusively through the web admin interface, whereas the
latter are mediated by email directly with end users (but often result in
@@ -49,7 +78,7 @@ During that week, the tasks broke down as follows:
* 2 requests that have been marked as needing admin attention
* 2 things marked as errors (message refused by server - spam, full mailbox, etc) to fix
-### User interaction tasks
+### User support tasks
* 16 general, daily admin: i.e. things that resulted in admin actions on the
site (bounces, misdelivered responses, etc)
@@ -59,9 +88,9 @@ During that week, the tasks broke down as follows:
* 3 requests to redact personal information
* 2 requests to redact defamatory information
-## Types of user interaction
+## User support
-There follows a breakdown of the most common kinds of user interaction. It's
+There follows a breakdown of the most common kinds of user support. It's
intended for use as a guide to the kind of policies and training that a support
team might need to develop.
@@ -253,13 +282,13 @@ Can be for many reasons, e.g.
themselves
* A reply has been automatically filed under the wrong request
-## Vexatious users
+### Vexatious users
Some users persistently misuse the website. An alaveteli site should have a
policy on banning users, for example giving them a first warning, informing
them about moderation policy, etc.
-## Mail import errors
+### Mail import errors
These are currently occurring at a rate of about two a month. Sometimes the
root cause seems to be blocking in the database when two mails are received for
@@ -274,9 +303,114 @@ the error sent to the site support address) in a file without the first "From"
line, and piping the contents of that file into the mail handling script. e.g.
```cat missing_mail.txt | script/mailin```
-## Censor rules
-Censor rules can be attached to a request or to a user and define bits of text
+## Maintenance
+
+### Administrator privileges and accessing the admin interface
+
+The administrative interface is at the URL `/admin`.
+
+Only users with the `super` admin level can access the admin interface. Users
+create their own accounts in the usual way, and then administrators can give
+them `super` privileges.
+
+There is an emergency user account which can be accessed via
+`/admin?emergency=1`, using the credentials `ADMIN_USERNAME` and
+`ADMIN_PASSWORD`, which are set in `general.yml`. To bootstrap the
+first `super` level accounts, you will need to log in as the emergency
+user. You can disable the emergency user account by setting `DISABLE_EMERGENCY_USER` to `true` in `general.yml`.
+
+Users with the superuser role also have extra privileges in the website
+front end, such as being able to categorise any request, being able to view
+items that have been hidden from the search, and being presented with "admin"
+links next to individual requests and comments in the front end.
+
+It is possible completely to override the administrator authentication by
+setting `SKIP_ADMIN_AUTH` to `true` in `general.yml`.
+
+### Removing a message from the 'Holding Pen'
+
+The reason a message is in the holding pen is because the email can't be automatically associated with the request it is responding to. The email needs to be moved from the holding pen to the request it belongs with.
+
+First, log into the admin interface at `/admin`. You will see messages that are in the 'holding pen' under the title ‘Put misdelivered responses with the right request’. Click on the chevron to see the individual messages.
+
+If you click on a message in the holding pen, you may see a guess made by Alaveteli as to which request the message belongs to. Check this request. If it isn't the right one, or if Alaveteli hasn't made any guesses, you will need to look at the `To:` address of the raw email and the contents of the mail in order to figure out which request it belongs to. You can browse and search requests in the admin interface under the 'Requests' menu item.
+
+Once you have identified the request the message belongs to, you need to go back to the holding pen message page. Paste the request `id` or `url_title` into the box under 'Actions' in 'Incoming Message'. The request `id` can be found in the request URL in the admin interface - it is the part after `/show/`. In the admin request URL `/admin/request/show/118`, the request `id` is `118`. The `url_title` can be found in the request URL in the main interface - it is the part after `/request/`. In the URL `/request/documents_relating_to_meeting`, it is `documents_relating_to_meeting`. Then click on 'Redeliver to another request'.
+
+The message will now be associated with the correct request and will appear on the public request page.
+
+### Editing and uploading public body email addresses
+
+
+
+### Banning a user
+
+You may wish to completely ban a user from the website (such as a spammer or troll for example). You need to log into the admin interface at `/admin`. On the top row of links, locate and click on ‘Users’.
+
+Find the user you wish to ban on the list and click on their name. Once on the user page, select ‘edit’.
+
+Enter some text in the in the ‘Ban text’ box to explain why they have been banned. Please be aware, this is publicly viewable from the users' account. Then click on save and the user will be banned.
+
+### Deleting a request
+
+You can delete a request entirely using the admin interface. You will mainly only need to do this if someone has posted private information. Go to the admin page for the request by searching or browsing in the 'Requests' section of the admin interface. In the first section, click the 'Edit metadata' button. At the bottom of the next page, click the red 'Destroy request entirely' button.
+
+### Hiding a request
+
+You can hide an entire request from the admin interface. Log in to the
+admin interface at `/admin`. On the top row of links, locate and click on
+'Requests'. Search or browse to find the admin page for the request you
+want to hide. You can also go directly to this page by following an
+'admin' link from the public request page. You can hide a request in one
+of two ways.
+
+ * <strong>Hiding a vexatious or non-FOI request and notifying the
+ requester</strong>
+ Scroll down to the 'actions' section of the request
+ admin page. Select one of the options next to 'Hide the request and
+ notify the user:' and customise the text of the email that will be
+ sent to the user to let them know what you've done. When you're
+ ready, click the 'Hide request' button.
+ * <strong>Hiding a request or making it only visible to the
+ requester without notifying the requester</strong>
+ In the 'Request metadata' section of the request
+ admin page, click 'Edit metadata'. Change the 'Prominence' value to
+ 'requester_only' to only allow the requester to view the request, or
+ to 'hidden' to hide the request from everyone except site admins.
+ When you're ready, click 'Save changes' at the bottom of the 'Edit
+ metadata' section. No email will be sent to the requester to notify
+ them of what you've done.
+
+### Hiding an incoming or outgoing message
+
+You may need to hide a particular incoming or outgoing message from a
+public request page, perhaps because someone has included personal
+information in it. You can do this from the message's page in the admin
+interface. You can get to a message's admin page either by following the
+links from the "Outgoing messages" or "Incoming messages" sections of
+the request's admin page, or directly from the public request page by
+clicking on the 'admin' link on the message itself. Once you are on the
+message's admin page, you can change it's prominence. Set the prominence
+to 'hidden' to hide it from everyone except site admins, or to
+'requester_only' to allow it to be viewed by the requester (and by site
+admins). If you can, add some text in the box 'Reason for prominence'.
+This will be displayed as part of the information that will appear on
+the request page where the message used to be, telling people that it
+has been hidden.
+
+### Editing an outgoing message
+
+You may find there is a need to edit an outgoing message because the requester has accidentally included personal information that they don't want to be published on the site. You can either follow one of the 'admin' links from the public request page on the site, or find the request from the admin interface by searching under 'Requests'.
+
+Scroll down to the 'Outgoing Messages' section, and click on 'Edit'.
+
+Then on the next page you will be able to edit the message accordingly and save it. The edited version will then appear on the Alaveteli website, although an unedited version will have been sent to the authority.
+
+
+### Hiding certain text from a request using censor rules
+
+Censor rules can be attached to a request or to a user. These rules define bits of text
to be removed (either from the request (and all associated files e.g. incoming
message attachments) or from all requests associated with a user), and some
replacement text. In binary files, the replacement text will always be a series
@@ -301,24 +435,23 @@ hanging the application altogether), so please:
* Restrict your use of them to cases that can't otherwise be easily covered.
* Keep them as simple and specific as possible.
-## Administrator privileges
+<strong>To attach a censor rule to a request</strong>, go to the admin page for the
+request, scroll to the bottom of the page, and click the "New censor
+rule (for this request only)" button. On the following page, enter the
+text that you want to replace e.g. 'some private info', the text you
+wish to replace it with e.g. '[private info has been hidden]', and a
+comment letting other admins know why you have hidden the information.
+
+<strong>To attach a censor rule to a user</strong>, so that it will be applied to all
+requests that the user has made, go to the user page in the admin
+interface. You can do this either by clicking on the admin heading
+'Users' and browsing or searching to find the user you want, or by
+following an 'admin' link for the user from the public interface. One
+you are on the admin page for the user, scroll to the bottom of the page
+and click the 'New censor rule' button. On the following page, enter the
+text that you want to replace e.g. 'my real name is Bruce Wayne', the
+text you wish to replace it with e.g. '[personal information has been
+hidden]', and a comment letting other admins know why you have hidden
+the information.
-The administrative interface is at the URL `/admin`.
-Only users with the `super` admin level can access the admin interface. Users
-create their own accounts in the usual way, and then administrators can give
-them `super` privileges.
-
-There is an emergency user account which can be accessed via
-`/admin?emergency=1`, using the credentials `ADMIN_USERNAME` and
-`ADMIN_PASSWORD`, which are set in `general.yml`. To bootstrap the
-first `super` level accounts, you will need to log in as the emergency
-user. You can disable the emergency user account by setting `DISABLE_EMERGENCY_USER` to `true` in `general.yml`.
-
-Users with the superuser role also have extra privileges in the website
-front end, such as being able to categorise any request, being able to view
-items that have been hidden from the search, and being presented with "admin"
-links next to individual requests and comments in the front end.
-
-It is possible completely to override the administrator authentication by
-setting `SKIP_ADMIN_AUTH` to `true` in `general.yml`.
diff --git a/docs/running/index.md b/docs/running/index.md
index 7257417ce..bbf30d3b9 100644
--- a/docs/running/index.md
+++ b/docs/running/index.md
@@ -16,10 +16,13 @@ site, you need to make sure day-to-day tasks get done too. Most Alaveteli sites
are run by a team who allocate some time every day to user support and generally keeping
the project up to date.
-* the [administrator's guide]({{ site.baseurl }}docs/running/admin_manual/) describes
+* The [administrator's guide]({{ site.baseurl }}docs/running/admin_manual/) describes
what you need to do and know to run your site
-* we've prepared a checklist of
+* The [redaction guide]({{ site.baseurl }}docs/running/redaction/) includes some
+ examples of Alaveteli's ability to redact sensitive information
+
+* We've prepared a checklist of
[things to consider]({{ site.baseurl }}docs/running/server/)
when setting up your production server
diff --git a/docs/running/redaction.md b/docs/running/redaction.md
new file mode 100644
index 000000000..6ab8fed86
--- /dev/null
+++ b/docs/running/redaction.md
@@ -0,0 +1,135 @@
+---
+layout: page
+title: Redacting Sensitive Information
+---
+
+# 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>.
+
+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).
+
+![Sign up form with additional details]({{ site.baseurl }}assets/img/redaction-sign-up-form.png)
+
+## Identity Card Number
+
+We'll start off by looking at the National Identity Card Number (ID Number from here). Its a good example of something that is relatively easy to redact. It's unique for each user, and it has a specified format to match against.
+
+To send the ID Number to the authority we'll override the [initial request template](https://github.com/mysociety/alaveteli/blob/master/app/views/outgoing_mailer/initial_request.text.erb) (code snippet shortened):
+
+ <%= raw @outgoing_message.body.strip %>
+
+ -------------------------------------------------------------------
+
+ <%= _('Requestor details') %>
+ <%= _('Identity Card Number') %>: <%= @user_identity_card_number %>
+
+When a request is made the user's ID Number is now added to the footer of the outgoing email.
+
+![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:
+
+![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.
+
+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.
+
+ # 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
+
+You can see the new <a href="{{site.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)
+
+Now the ID Number gets redacted:
+
+![Automatically Redacted ID Number]({{ site.baseurl }}assets/img/redaction-id-number-redacted.png)
+
+It also gets redacted if the public body use the ID Number in the main email body:
+
+![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.
+
+**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:
+
+![ID Number not redacted in main body]({{ site.baseurl }}assets/img/redaction-id-number-in-main-body-not-redacted.png)
+
+**Warning:** Alaveteli also attempts to redact the text from any attachments. It can only do this if it can find the exact string, which is often not possible in binary formats such as PDF or Word.
+
+Alaveteli can usually redact the sensitive information when converting a PDF or text based attachment to HTML:
+
+![PDF to HTML Redaction]({{ site.baseurl }}assets/img/redaction-pdf-redaction-as-html.png)
+
+This PDF does not contain the string in the raw binary so the redaction is _not_ applied when downloading the original PDF document:
+
+![Download original PDF]({{ site.baseurl }}assets/img/redaction-pdf-redaction-download.png)
+
+## General Law
+
+The General Law information is much harder to automatically redact. It is not as structured, and the information is unlikely to be unique (e.g. Domicile: London).
+
+We'll add the General Law information to the [initial request template](https://github.com/mysociety/alaveteli/blob/master/app/views/outgoing_mailer/initial_request.text.erb) in the same way as the ID Number:
+
+ <%= _('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 %>
+ ===================================================================
+
+Note that the information is now contained in a specially formatted block of text.
+
+![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.
+
+ # 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
+
+![Redacted address in fence]({{ site.baseurl }}assets/img/redaction-address-quoted-redacted.png)
+
+**Warning:** Redacting unstructured information is a very fragile approach, as it relies on authorities always quoting the entire formatted block.
+
+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.
+
+![Censor Rule to redact a user's Domicile]({{ site.baseurl }}assets/img/redaction-domicile-censor-rule.png)
+
+The redaction has been applied but there is no way of knowing the context that the use of the sensitive word is used.
+
+![Censor Rule to redact a user's Domicile]({{ site.baseurl }}assets/img/redaction-domicile-censor-rule-applied.png)
diff --git a/docs/running/security.md b/docs/running/security.md
new file mode 100644
index 000000000..a22c4d636
--- /dev/null
+++ b/docs/running/security.md
@@ -0,0 +1,36 @@
+---
+layout: page
+title: Security & Maintenance
+---
+
+# Security & Maintenance
+
+<p class="lead">
+ Support of Alaveteli is divided into four groups: New features, bug fixes, security issues, and severe security issues. They are handled as follows:
+</p>
+
+## New Features
+
+Only the [latest development branch](https://github.com/mysociety/alaveteli/tree/rails-3-develop/) gets new features which will be released in the next main release.
+
+## Bug Fixes
+
+- Only the current release will receive bug fixes
+- Bug fixes will get a new release (e.g. `0.19.0` gets a new release to `0.19.1`)
+- Bug fixes will be applied to current development branch
+
+## Security Issues
+
+- The current release, previous release and current development branch will receive fixes
+- Security issues will get a new release (e.g. `0.19.0` gets a new release to `0.19.1`) for the current and previous releases
+- Generic patch will be posted to the mailing list
+
+## Severe Security Issues
+
+- Severe is determined by the Alaveteli core team
+- The current release, previous release and current development branch will receive fixes
+- Severe security issues will get a new release (e.g. `0.19.0` gets a new release to `0.19.1`) for supported versions
+- Generic patch will be posted to the mailing list
+- All releases known to be in production will receive patches and every effort will be made to contact known re-users for a private disclosure
+
+
diff --git a/docs/running/upgrading.md b/docs/running/upgrading.md
index ab8db2385..533035892 100644
--- a/docs/running/upgrading.md
+++ b/docs/running/upgrading.md
@@ -12,6 +12,41 @@ Upgrading Alaveteli
This page describes how to keep your site up-to-date
</p>
+## How to upgrade the code
+
+* If you're using Capistrano for deployment,
+ simply [deploy the code]({{site.baseurl}}docs/installing/deploy/#usage):
+ set the repo and branch in `deploy.yml` to be the version you want.
+ We recommend you set this to the explicit tag name (for example,
+ `0.18`, and not `master`) so there's no risk of you accidentally deploying
+ a new version before you're aware it's been released.
+* otherwise, you can simply upgrade by running `git pull`
+
+## Run the post-deploy script
+
+Unless you're [using Capistrano for deployment]({{site.baseurl}}docs/installing/deploy/),
+you should always run the script `scripts/rails-post-deploy` after each
+deployment. This runs any database migrations for you, plus various other
+things that can be automated for deployment.
+
+## Alaveteli Version Numbers
+
+Alaveteli uses a shifted version of [semver](http://semver.org).
+
+- Series `W`
+- Major `X`
+- Minor `Y`
+- Patch `Z`
+
+At the time of writing the current release is `0.19.0.6`:
+
+- Series `0`
+- Major `19`
+- Minor `0`
+- Patch `6`
+
+Alaveteli will transition to the [semver](http://semver.org) specification when it reaches `1.0.0`.
+
## Master branch contains the latest stable release
The developer team policy is that the `master` branch in git should always
@@ -26,30 +61,16 @@ Upgrading may just require pulling in the latest code -- but it may also require
other changes ("further action"). For this reason, for anything other than a
*patch* (see below), always read the
[`CHANGES.md`](https://github.com/mysociety/alaveteli/blob/master/doc/CHANGES.md)
-document **before** doing an uprade. This way you'll be able to prepare for any
+document **before** doing an upgrade. This way you'll be able to prepare for any
other changes that might be needed to make the new code work.
-## How to upgrade the code
-
-* If you're using Capistrano for deployment,
- simply [deploy the code]({{site.baseurl}}docs/installing/deploy/#usage):
- set the repo and branch in `deploy.yml` to be the version you want.
- We recommend you set this to the explicit tag name (for example,
- `0.18`, and not `master`) so there's no risk of you accidentally deploying
- a new version before you're aware it's been released.
-* otherwise, you can simply upgrade by running `git pull`
-
## Patches
-Patch version increases (e.g. 1.2.3 &rarr; 1.2.**4**) should not require any further
-action on your part.
+Patch version increases (e.g. 0.1.2.3 &rarr; 0.1.2.**4**) should not require any further action on your part. They will be backwards compatible with the current minor release version.
## Minor version increases
-Minor version increases (e.g. 1.2.4 &rarr; 1.**3**.0) will usually require further
-action. You should read the [`CHANGES.md`](https://github.com/mysociety/alaveteli/blob/master/doc/CHANGES.md)
-document to see what's changed since your last deployment, paying special attention
-to anything in the "Upgrade notes" sections.
+Minor version increases (e.g. 0.1.2.4 &rarr; 0.1.**3**.0) will usually require further action. You should read the [`CHANGES.md`](https://github.com/mysociety/alaveteli/blob/master/doc/CHANGES.md) document to see what's changed since your last deployment, paying special attention to anything in the "Upgrade notes" sections.
Any upgrade may include new translations strings, that is, new or altered messages
to the user that need translating to your locale. You should visit Transifex
@@ -59,10 +80,32 @@ your website in English by default. If your translations didn't make it to the
latest release, you will need to download the updated `app.po` for your locale
from Transifex and save it in the `locale/` folder.
-## Run the post-deploy script
+Minor releases will be backwards compatible with the current major release version.
-Unless you're [using Capistrano for deployment]({{site.baseurl}}docs/installing/deploy/),
-you should always run the script `scripts/rails-post-deploy` after each
-deployment. This runs any database migrations for you, plus various other
-things that can be automated for deployment.
+## Major releases
+
+Major version increases (e.g. 0.1.2.4 &rarr; 0.2.0.0) will usually require further action. You should read the [`CHANGES.md`](https://github.com/mysociety/alaveteli/blob/master/doc/CHANGES.md) document to see what's changed since your last deployment, paying special attention to anything in the "Upgrade notes" sections.
+
+Only major releases may remove existing functionality. You will be warned about the removal of functionality with a deprecation notice in a minor release prior to the major release that removes the functionality.
+
+## Series releases
+
+Special instructions will accompany series releases.
+
+## Deprecation Notices
+
+You may start to see deprecation notices in your application log. They will look like:
+
+ DEPRECATION WARNING: Object#id will be deprecated; use Object#object_id
+
+Deprecation notices allow us to communicate with you that some functionality will change or be removed in a later release of Alaveteli.
+
+### What to do if you see a deprecation notice
+
+You will usually see a deprecation notice if you have been using functionality in your theme that is now due to change or be removed. The notice should give you a fair explanation of what to do about it. Usually it will be changing or removing methods. The [changelog](https://github.com/mysociety/alaveteli/blob/rails-3-develop/doc/CHANGES.md) will include more detailed information about the deprecation and how to make the necessary changes.
+
+If you're ever unsure, don't hesitate to ask in the [developer mailing list](https://groups.google.com/group/alaveteli-dev) or [Alaveteli IRC channel](http://www.irc.mysociety.org/).
+
+### When will the change take place?
+We introduce deprecation notices in a **minor** release. The following **major** release will make the change unless otherwise stated in the deprecation notice.