test helpers to determine if user has access to app
Method to determine if user has access - tests pass
Retrofit authorize with tests, tests also require user set whatever

This will allow us to use the permissions array in other places to
determine the access a user has
Tests pass - the user is always set in the session

they must also have access to be signed in.
Test for new app root behaviour
Test if user has access and redirect accordingly

If this can't yet be determined, redirect to login.
Includes template for new app root - you can't sign in.
Tests pass
Test for fix of signed in template behaviour
Template context contains user - fixes test for signed in on template
Change tests for new template
Respond to henry's comments about the template
Tests for new get_authorization_url method taken out of login

root will will now redirect to the url given by this
Remove login route. root now redirects here if the user has no session.

To try again when a user has the permission they will have to sign out
and sign in again. If this becomes a problem we can readd a hidden
/login route or cause the app /sign_out root to only clear the session
and not log the user out of signon. Then revisiting the app root will
correctly log them in.
test for redirect to authorization url

also remove old comment
redirect to authorization url when no session - tests pass
Merge pull request #44 from alphagov/nice-page-when-no-signin-permission

Nice page when no signin permission
Fix bug when parsing rows containing just numbers

If a row contains a single column with numbers, parsing will fail:

    TypeError: object of type 'int' has no len()

Test for a string before calling len().
Merge pull request #45 from alphagov/76808354-bugfix-parsing-spreadsheets

Fix bug when parsing rows containing just numbers
Link to upload data page in navigation bar

Everyone who can sign in can see this, so there's no need to wrap
it in logic.
Add @requires_permission decorator

This decorator takes a string and either redirects the user or
allows them to continue on with their request.
Add view helper to conditionally show navigation

We want to show a link to allow the user to edit dashboards, but
only if they have that permission.