Skip to content

Commit 4cbc5c0

Browse files
authored
Merge pull request #2667 from alphagov/revert-ww-org-multipart
Remove support for multi-part Worldwide Organisation content
2 parents 1b9c821 + c82ab01 commit 4cbc5c0

File tree

12 files changed

+45
-505
lines changed

12 files changed

+45
-505
lines changed

app/validators/routes_and_redirects_validator.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ def validate(record, attribute, route, base_path)
103103
def below_base_path?(path, base_path)
104104
return true if path =~ %r{^#{base_path}\.[\w-]+\z}
105105

106-
suffix = /\.([\w-]+\z)$/.match(base_path).to_a&.first || ""
107-
base_path_without_suffix = base_path.gsub(suffix, "")
108-
109-
/^#{base_path_without_suffix}.*#{suffix}/.match?(path)
106+
/^#{base_path}/.match?(path)
110107
end
111108

112109
def segments(path)

content_schemas/dist/formats/worldwide_office/frontend/schema.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,6 @@
306306
"change_history": {
307307
"$ref": "#/definitions/change_history"
308308
},
309-
"contact_content_id": {
310-
"$ref": "#/definitions/guid"
311-
},
312309
"services": {
313310
"type": "array",
314311
"items": {
@@ -333,13 +330,6 @@
333330
},
334331
"uniqueItems": true
335332
},
336-
"slug": {
337-
"type": "string",
338-
"format": "uri"
339-
},
340-
"title": {
341-
"type": "string"
342-
},
343333
"type": {
344334
"description": "The type of Worldwide Office.",
345335
"type": [

content_schemas/dist/formats/worldwide_office/notification/schema.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,6 @@
405405
"change_history": {
406406
"$ref": "#/definitions/change_history"
407407
},
408-
"contact_content_id": {
409-
"$ref": "#/definitions/guid"
410-
},
411408
"services": {
412409
"type": "array",
413410
"items": {
@@ -432,13 +429,6 @@
432429
},
433430
"uniqueItems": true
434431
},
435-
"slug": {
436-
"type": "string",
437-
"format": "uri"
438-
},
439-
"title": {
440-
"type": "string"
441-
},
442432
"type": {
443433
"description": "The type of Worldwide Office.",
444434
"type": [

content_schemas/dist/formats/worldwide_office/publisher_v2/schema.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@
177177
"null"
178178
]
179179
},
180-
"contact_content_id": {
181-
"$ref": "#/definitions/guid"
182-
},
183180
"services": {
184181
"type": "array",
185182
"items": {
@@ -204,13 +201,6 @@
204201
},
205202
"uniqueItems": true
206203
},
207-
"slug": {
208-
"type": "string",
209-
"format": "uri"
210-
},
211-
"title": {
212-
"type": "string"
213-
},
214204
"type": {
215205
"description": "The type of Worldwide Office.",
216206
"type": [

content_schemas/dist/formats/worldwide_organisation/frontend/schema.json

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -341,63 +341,6 @@
341341
"default_news_image": {
342342
"$ref": "#/definitions/image"
343343
},
344-
"home_page_office_parts": {
345-
"type": "array",
346-
"items": {
347-
"type": "object",
348-
"additionalProperties": false,
349-
"properties": {
350-
"access_and_opening_times": {
351-
"description": "The access and opening times for this Worldwide Office.",
352-
"type": [
353-
"string",
354-
"null"
355-
]
356-
},
357-
"contact_content_id": {
358-
"$ref": "#/definitions/guid"
359-
},
360-
"services": {
361-
"type": "array",
362-
"items": {
363-
"type": "object",
364-
"additionalProperties": false,
365-
"properties": {
366-
"title": {
367-
"description": "The name of the service provided by this Worldwide Office.",
368-
"type": [
369-
"string",
370-
"null"
371-
]
372-
},
373-
"type": {
374-
"description": "The type of service provided by this Worldwide Office.",
375-
"type": [
376-
"string",
377-
"null"
378-
]
379-
}
380-
}
381-
},
382-
"uniqueItems": true
383-
},
384-
"slug": {
385-
"type": "string",
386-
"format": "uri"
387-
},
388-
"title": {
389-
"type": "string"
390-
},
391-
"type": {
392-
"description": "The type of Worldwide Office.",
393-
"type": [
394-
"string",
395-
"null"
396-
]
397-
}
398-
}
399-
}
400-
},
401344
"logo": {
402345
"description": "The organisation's logo, including the logo image and formatted name.",
403346
"type": "object",
@@ -430,63 +373,6 @@
430373
}
431374
}
432375
},
433-
"main_office_parts": {
434-
"type": "array",
435-
"items": {
436-
"type": "object",
437-
"additionalProperties": false,
438-
"properties": {
439-
"access_and_opening_times": {
440-
"description": "The access and opening times for this Worldwide Office.",
441-
"type": [
442-
"string",
443-
"null"
444-
]
445-
},
446-
"contact_content_id": {
447-
"$ref": "#/definitions/guid"
448-
},
449-
"services": {
450-
"type": "array",
451-
"items": {
452-
"type": "object",
453-
"additionalProperties": false,
454-
"properties": {
455-
"title": {
456-
"description": "The name of the service provided by this Worldwide Office.",
457-
"type": [
458-
"string",
459-
"null"
460-
]
461-
},
462-
"type": {
463-
"description": "The type of service provided by this Worldwide Office.",
464-
"type": [
465-
"string",
466-
"null"
467-
]
468-
}
469-
}
470-
},
471-
"uniqueItems": true
472-
},
473-
"slug": {
474-
"type": "string",
475-
"format": "uri"
476-
},
477-
"title": {
478-
"type": "string"
479-
},
480-
"type": {
481-
"description": "The type of Worldwide Office.",
482-
"type": [
483-
"string",
484-
"null"
485-
]
486-
}
487-
}
488-
}
489-
},
490376
"office_contact_associations": {
491377
"type": "array",
492378
"items": {

content_schemas/dist/formats/worldwide_organisation/notification/schema.json

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -476,63 +476,6 @@
476476
"default_news_image": {
477477
"$ref": "#/definitions/image"
478478
},
479-
"home_page_office_parts": {
480-
"type": "array",
481-
"items": {
482-
"type": "object",
483-
"additionalProperties": false,
484-
"properties": {
485-
"access_and_opening_times": {
486-
"description": "The access and opening times for this Worldwide Office.",
487-
"type": [
488-
"string",
489-
"null"
490-
]
491-
},
492-
"contact_content_id": {
493-
"$ref": "#/definitions/guid"
494-
},
495-
"services": {
496-
"type": "array",
497-
"items": {
498-
"type": "object",
499-
"additionalProperties": false,
500-
"properties": {
501-
"title": {
502-
"description": "The name of the service provided by this Worldwide Office.",
503-
"type": [
504-
"string",
505-
"null"
506-
]
507-
},
508-
"type": {
509-
"description": "The type of service provided by this Worldwide Office.",
510-
"type": [
511-
"string",
512-
"null"
513-
]
514-
}
515-
}
516-
},
517-
"uniqueItems": true
518-
},
519-
"slug": {
520-
"type": "string",
521-
"format": "uri"
522-
},
523-
"title": {
524-
"type": "string"
525-
},
526-
"type": {
527-
"description": "The type of Worldwide Office.",
528-
"type": [
529-
"string",
530-
"null"
531-
]
532-
}
533-
}
534-
}
535-
},
536479
"logo": {
537480
"description": "The organisation's logo, including the logo image and formatted name.",
538481
"type": "object",
@@ -565,63 +508,6 @@
565508
}
566509
}
567510
},
568-
"main_office_parts": {
569-
"type": "array",
570-
"items": {
571-
"type": "object",
572-
"additionalProperties": false,
573-
"properties": {
574-
"access_and_opening_times": {
575-
"description": "The access and opening times for this Worldwide Office.",
576-
"type": [
577-
"string",
578-
"null"
579-
]
580-
},
581-
"contact_content_id": {
582-
"$ref": "#/definitions/guid"
583-
},
584-
"services": {
585-
"type": "array",
586-
"items": {
587-
"type": "object",
588-
"additionalProperties": false,
589-
"properties": {
590-
"title": {
591-
"description": "The name of the service provided by this Worldwide Office.",
592-
"type": [
593-
"string",
594-
"null"
595-
]
596-
},
597-
"type": {
598-
"description": "The type of service provided by this Worldwide Office.",
599-
"type": [
600-
"string",
601-
"null"
602-
]
603-
}
604-
}
605-
},
606-
"uniqueItems": true
607-
},
608-
"slug": {
609-
"type": "string",
610-
"format": "uri"
611-
},
612-
"title": {
613-
"type": "string"
614-
},
615-
"type": {
616-
"description": "The type of Worldwide Office.",
617-
"type": [
618-
"string",
619-
"null"
620-
]
621-
}
622-
}
623-
}
624-
},
625511
"office_contact_associations": {
626512
"type": "array",
627513
"items": {

0 commit comments

Comments
 (0)