Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow external redirects to caa.co.uk #2510

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

ollietreend
Copy link
Contributor

This allows users to unpublish documents and redirect it to URLs on the Civil Aviation Authority (CAA) website.

Requested in Zendesk ticket:
https://govuk.zendesk.com/agent/tickets/4994883

And agreed in Slack thread:
https://gds.slack.com/archives/CACV3TACU/p1694690016148749

I originally added this to Whitehall in PR alphagov/whitehall#8290 before realising that the document to be unpublished & redirected is actually published via Specialist Publisher, and therefore this is actually where the list needs updating. 🙈


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the publishing platform team. Please let us know in #govuk-publishing-platform when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

The validation error message was hardcoded and no longer reflected the
full list of allowed domains. This confused me when trying to debug a
failing external redirect because I expected the error message to list
all the allowed domains.

I've made this error message dynamic so it always reflects the current
allow list.

Before:
external redirects only accepted within the gov.uk, judiciary.uk, nhs.uk or ukri.org domains

After:
external redirects only accepted for the domains .gov.uk, .judiciary.uk, .nationalhighways.co.uk, .nhs.uk, .police.uk, and .ukri.org
This allows users to unpublish documents and redirect it to URLs on the
Civil Aviation Authority (CAA) website.

Requested in Zendesk ticket:
https://govuk.zendesk.com/agent/tickets/4994883

And agreed in Slack thread:
https://gds.slack.com/archives/CACV3TACU/p1694690016148749

I originally added this to Whitehall in PR alphagov/whitehall#8290
before realising that the document to be unpublished & redirected is
actually published via Specialist Publisher, and therefore this is
actually where the list needs updating. 🙈
@ollietreend ollietreend changed the title Allow redirects to caa Allow external redirects to caa.co.uk Sep 22, 2023
Copy link
Contributor

@patrickpatrickpatrick patrickpatrickpatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ollietreend ollietreend merged commit 173d4b7 into main Sep 22, 2023
8 checks passed
@ollietreend ollietreend deleted the allow-redirects-to-caa branch September 22, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants