Skip to content

Commit bfb3abd

Browse files
authored
Merge pull request #258 from oslokommune/pubs-client-name-laxing
More permissive public service integration names
2 parents cef0744 + 6db1a09 commit bfb3abd

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## ?.?.? - Unreleased
22

33
* Removed Origo as an organization choice for public services.
4+
* Public service integration naming is now more permissive, since the
5+
integration name is visible to end users in case of ID-porten clients.
46
* Improved request timeout handling.
57

68
## 6.0.0 - 2026-01-30

okdata/cli/commands/validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ def validate(self, document):
6767
raise ValidationError(
6868
message="Too long!", cursor_position=len(document.text)
6969
)
70-
if not re.fullmatch("[0-9a-z-]+", document.text):
70+
if not re.fullmatch("[0-9a-zA-Z -]+", document.text):
7171
raise ValidationError(
72-
message='Only lowercase letters, numbers and "-", please',
72+
message='Only letters, numbers, spaces and "-", please',
7373
cursor_position=len(document.text),
7474
)
7575

tests/origocli/commands/validators_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,16 @@ def test_valid_integrations(self):
108108
self.validate_document({"text": "x"})
109109
self.validate_document({"text": "a-b-c-1-2-3"})
110110
self.validate_document({"text": "q3v3avjd40dmpwicg7kn3xo8drbslu"})
111+
self.validate_document({"text": "foo bar"})
112+
self.validate_document({"text": "Foobar"})
111113

112114
def test_invalid_integrations(self):
113115
with pytest.raises(ValidationError):
114116
self.validate_document({"text": ""})
115117
with pytest.raises(ValidationError):
116118
self.validate_document({"text": "foo_bar"})
117-
with pytest.raises(ValidationError):
118-
self.validate_document({"text": "foo bar"})
119119
with pytest.raises(ValidationError):
120120
self.validate_document({"text": "foobar😅"})
121-
with pytest.raises(ValidationError):
122-
self.validate_document({"text": "Foobar"})
123121
with pytest.raises(ValidationError):
124122
self.validate_document({"text": "qrmfffqgqzpvlmhmx3vvns3yhlrp9am"})
125123

0 commit comments

Comments
 (0)