Commit Graph

14648 Commits

Author SHA1 Message Date
Rebecca Law
fd59491d19 Merge pull request #3284 from alphagov/fix-sign-out-bug
Check if user is authenticated before signing out
2020-02-04 14:37:08 +00:00
Pea Tyczynska
46292949cd Fix bug where job url type was constructed for letter on uploads page 2020-02-04 14:19:07 +00:00
karlchillmaid
ca5a92c682 Comment out 'Upload your own letters'
Comment out 'Upload your own letters'  because this feature is not available to all users yet.
2020-02-04 13:51:43 +00:00
karlchillmaid
92ad395fca Comment out and update content
Comment out and update content because Upload a letter is not available to all users yet.
2020-02-04 13:50:29 +00:00
karlchillmaid
5314ba72cc Remove 'Upload a letter'
Remove 'Upload a letter' from navigation because it's not available to all users yet.
2020-02-04 13:48:45 +00:00
karlchillmaid
238fcd4652 Fix spacing 2020-02-04 13:45:55 +00:00
karlchillmaid
faf983356e Add status page and email
Add status page and email instructions to the 5xx error.

These match what we show on the 500 error page.
2020-02-04 13:44:55 +00:00
Rebecca Law
8a19d9496a Check if user is authenticated before signing out, this will prevent a 500 if the user is an AnonymousUser.
I ended up creating a new test user and logged_in_client, which isn't really great. But I tried adding a current_session_id to the active user in the test, but that broke all other tests.
I tried setting current_session_id in all the users being tested but that didn't work either. I'd like to come back to fixing the tests and reducing the number of conftest methods in another PR. For now this fixes the bug.
2020-02-04 12:16:58 +00:00
karlchillmaid
fa8a4ae4c2 Update error description 2020-02-03 17:02:22 +00:00
Tom Byers
f8564ebe0c Make agreed changes to content
The following changes are still to be decided:
- how to tell userr when the service will be up
  again on the PaaS failwhale page
- contact information for both pages
2020-02-03 17:02:01 +00:00
Tom Byers
9263bac59e Remove all code targetting IE8
We've dropped support for IE8 so this isn't
needed. For reference:

https://github.com/alphagov/notifications-admin/pull/3158#pullrequestreview-308447860
2020-02-03 17:01:54 +00:00
Tom Byers
048f0f3179 Update JavaScripts 2020-02-03 17:01:47 +00:00
Tom Byers
3e31cdbfd2 Update fonts 2020-02-03 17:01:38 +00:00
Tom Byers
88bd14811d Update app/assets/error_pages/5xx.html 2020-02-03 17:01:28 +00:00
Tom Byers
a42eaf4184 Update PaaS Failwhale HTML page 2020-02-03 17:00:57 +00:00
Tom Byers
974826e3e2 Update stylesheets 2020-02-03 17:00:24 +00:00
Tom Byers
340111b187 Update images 2020-02-03 17:00:08 +00:00
Chris Hill-Scott
cceb731596 Rename test to be a more explicit about what it’s testing
It’s not just that they’re an org user, it’s that they’re also a service user. And the usage page is the special case.
2020-02-03 16:28:47 +00:00
Leo Hemsted
c8648553eb freeze reqs 2020-02-03 16:13:58 +00:00
karlchillmaid
b37560ebe8 Remove Send messages link 2020-02-03 16:06:32 +00:00
Chris Hill-Scott
b7b9e9747b Add test for org user who is also a service user
Org users should always be able to see the usage page, even if they
don’t have the `manage_service` permission for the service.
2020-02-03 16:05:46 +00:00
Rebecca Law
18523587a6 Merge pull request #3282 from alphagov/sign-out-user-server-side
Ensure that the session is logged out server side, not just client side.
2020-02-03 15:25:18 +00:00
Rebecca Law
0e1ee504ac - Add unit test for when case when the cookie doesn't match the db.
- Move code into User.signout method to further encapsulate the code.
2020-02-03 15:08:55 +00:00
karlchillmaid
fcf1494051 Update links - comment out Send messages 2020-02-03 15:04:48 +00:00
karlchillmaid
b0e539abba Fix </ol> tag 2020-02-03 14:25:28 +00:00
pyup-bot
de5ddf1823 Update notifications-python-client from 5.5.0 to 5.5.1 2020-02-03 13:47:04 +00:00
karlchillmaid
6d4d176039 Edit content 2020-02-03 13:29:58 +00:00
karlchillmaid
76f46e47d7 Update description 2020-02-03 13:26:02 +00:00
karlchillmaid
0d9f5b27cd Update description of clickable link text
Update description of clickable link text to make it clear we're talking about email. This is because we **do** hide URLs behind clickable link text on web pages.
2020-02-03 13:22:38 +00:00
karlchillmaid
6341c4adb3 Fix </b> tag 2020-02-03 13:11:41 +00:00
karlchillmaid
d9f9205e78 Add instruction 2020-02-03 13:09:55 +00:00
karlchillmaid
83bcd78e44 Delete 'name' from explanation 2020-02-03 13:05:37 +00:00
karlchillmaid
6843930d48 Update link headings 2020-02-03 13:02:55 +00:00
Chris Hill-Scott
8b9c2b7427 Fix tests 2020-02-03 12:47:42 +00:00
Rebecca Law
937c9f2adc Ensure that the session is logged out server side, not just client side.
Anytime a user clicks "sign out" we should be signing them out server side as well. This can be accomplished by setting the Users.current_session_id = null.
I found that the method User.logged_in_elsewhere doesn't need to check if the current_session_id is None. The current_session_ids in the cookie and db (redis or postgres) then the user should be forced to log in again.
2020-02-03 12:24:02 +00:00
Chris Hill-Scott
a35931a33a Swap order of usage and team members for org users
Org users, when looking at the page for their org, see:
> Usage
> Team members

When they click into a service it switches to:
> Team members
> Usage

This is jarring. It should stay consistent. I think it that _Usage_ then
_Team members_ is the natural way of ordering the navigation at the
organisation level, so let’s follow that through to the service level.

This does mean that if someone is a member of both an organisation and a
service that the nav will jump (because it’ll switch to the existing,
service-level order of _Team members_ then _Usage_) but it’s going to
jump anyway because you get all the extra navigation items when you’re a
member of a service.
2020-02-03 11:39:58 +00:00
Chris Hill-Scott
172f93e841 Refactor navigation logic
Will be easier to change if the navigation shown to org users is
separated from the navigation shown to regular users of a service.
2020-02-03 11:39:13 +00:00
Matt Hobbs
9d4b761d12 Minify SVG, other SVG's already optimised 2020-01-29 17:33:56 +00:00
Matt Hobbs
ac405f00f4 Product image optimisations 2020-01-29 16:56:40 +00:00
Matt Hobbs
d87136fb70 Letter template optimisations 2020-01-29 16:54:48 +00:00
Leo Hemsted
a49b492ade Merge pull request #3277 from alphagov/datetime-fix
bump utils to fix datetime formatting jinja bug
2020-01-28 13:07:20 +00:00
Leo Hemsted
01ba256ef9 bump utils to fix datetime formatting jinja bug 2020-01-28 10:32:21 +00:00
Matt Hobbs
bf6cbace2c Image optimisations for the email-template folder. 2020-01-28 10:03:07 +00:00
Matt Hobbs
114ba1f457 Optimisation of the images in the root assets folder 2020-01-28 09:50:56 +00:00
Leo Hemsted
b2d18e16ef Merge pull request #3276 from alphagov/letter-error-display
handle invalid upload errors correctly
2020-01-27 15:31:32 +00:00
Leo Hemsted
4e1fcfbff1 handle invalid upload errors correctly
previously it assumed that invalid_pages would always exist, however it
might be `None` if the error isn't on a specific page. Errors on
specific pages include a page not being A4 or content being outside the
boundary. Errors not on specific pages include the file not being a pdf,
or containing too many pages
2020-01-27 15:11:37 +00:00
karlchillmaid
c0bafc26fe Add link to Guidance and fix formatting
Add link to Guidance and add bold to instructions for consistency
2020-01-27 11:58:37 +00:00
Tom Byers
a4ba99b748 Redo send_messages as create_and_send_messages
Reverts changes in the following commits:
- 1e8ba88b4d
- 133a62022c
- b76066dd76

These changes `main.create_and_send_messages` to
`main.send_messages` but this name was already
taken.

Further details on Github:

https://github.com/alphagov/notifications-admin/pull/3213#pullrequestreview-348548476
2020-01-27 11:51:24 +00:00
karlchillmaid
87e42cc4bb Revert filename
Reverts part of commit 1af5136f9c
2020-01-27 11:33:39 +00:00
karlchillmaid
885b78eac5 Update if statement and instructions
Update if statement and instructions to make them consistent with the guidance pages.
2020-01-27 09:31:45 +00:00