Skip to content

Allow admins to restrict applications to whitelisted postcode areas #37

Description

@vladpm

Problem

Applicants can currently begin or submit an application for an address outside the council's area. This increases the risk of people applying to the wrong council, creating avoidable work for applicants and licensing teams.

Proposed solution

Allow administrators to configure a whitelist of eligible postcode areas for their council. The application journey should check the property address postcode against this list and prevent an application from proceeding when the address is outside the configured area.

Acceptance criteria

  • Administrators can enable or disable postcode-based eligibility checks.
  • Administrators can add, edit, and remove allowed UK postcode prefixes/outward codes (for example, LS1 or LS6).
  • Postcodes are normalised for case and spacing before comparison.
  • The property address is checked when it is selected or entered, before the applicant proceeds with the application.
  • An applicant whose postcode is not allowed sees a clear message explaining that the address is outside this council's area and that they should contact the relevant council.
  • Eligibility is enforced server-side as well as in the user interface, so it cannot be bypassed.
  • Existing councils are unaffected until the restriction is explicitly enabled; an empty whitelist does not unexpectedly block applications.
  • Automated tests cover allowed postcodes, rejected postcodes, normalisation, disabled restrictions, and empty configuration.

Notes

Postcode areas do not always align perfectly with local authority boundaries. This feature should reduce wrong-council applications while leaving room for a more precise UPRN or gazetteer-based boundary check in future.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions