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

Remove support for multi-part Worldwide Organisation content #2667

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions app/validators/routes_and_redirects_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ def validate(record, attribute, route, base_path)
def below_base_path?(path, base_path)
return true if path =~ %r{^#{base_path}\.[\w-]+\z}

suffix = /\.([\w-]+\z)$/.match(base_path).to_a&.first || ""
base_path_without_suffix = base_path.gsub(suffix, "")

/^#{base_path_without_suffix}.*#{suffix}/.match?(path)
/^#{base_path}/.match?(path)
end

def segments(path)
Expand Down
10 changes: 0 additions & 10 deletions content_schemas/dist/formats/worldwide_office/frontend/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@
"change_history": {
"$ref": "#/definitions/change_history"
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
Expand All @@ -333,13 +330,6 @@
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,6 @@
"change_history": {
"$ref": "#/definitions/change_history"
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
Expand All @@ -432,13 +429,6 @@
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@
"null"
]
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
Expand All @@ -204,13 +201,6 @@
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,63 +341,6 @@
"default_news_image": {
"$ref": "#/definitions/image"
},
"home_page_office_parts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_and_opening_times": {
"description": "The access and opening times for this Worldwide Office.",
"type": [
"string",
"null"
]
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"description": "The name of the service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
},
"type": {
"description": "The type of service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
}
}
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
"string",
"null"
]
}
}
}
},
"logo": {
"description": "The organisation's logo, including the logo image and formatted name.",
"type": "object",
Expand Down Expand Up @@ -430,63 +373,6 @@
}
}
},
"main_office_parts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_and_opening_times": {
"description": "The access and opening times for this Worldwide Office.",
"type": [
"string",
"null"
]
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"description": "The name of the service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
},
"type": {
"description": "The type of service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
}
}
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
"string",
"null"
]
}
}
}
},
"office_contact_associations": {
"type": "array",
"items": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,63 +476,6 @@
"default_news_image": {
"$ref": "#/definitions/image"
},
"home_page_office_parts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_and_opening_times": {
"description": "The access and opening times for this Worldwide Office.",
"type": [
"string",
"null"
]
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"description": "The name of the service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
},
"type": {
"description": "The type of service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
}
}
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
"string",
"null"
]
}
}
}
},
"logo": {
"description": "The organisation's logo, including the logo image and formatted name.",
"type": "object",
Expand Down Expand Up @@ -565,63 +508,6 @@
}
}
},
"main_office_parts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_and_opening_times": {
"description": "The access and opening times for this Worldwide Office.",
"type": [
"string",
"null"
]
},
"contact_content_id": {
"$ref": "#/definitions/guid"
},
"services": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"description": "The name of the service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
},
"type": {
"description": "The type of service provided by this Worldwide Office.",
"type": [
"string",
"null"
]
}
}
},
"uniqueItems": true
},
"slug": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
},
"type": {
"description": "The type of Worldwide Office.",
"type": [
"string",
"null"
]
}
}
}
},
"office_contact_associations": {
"type": "array",
"items": {
Expand Down
Loading
Loading