-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding ability to restrict allowed characters in an asset id and allowing (
and )
#701
Conversation
(
and )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear to meet the criteria on #340.
Configuration includes a string that contains the permitted characters
This has a configuration that stores restricted characters
and also a flag to enable:
no restrictions
restriction for new assets but allow updates of existing
fail for updates too
This has a single boolean flag to enable/disable and doesn't appear to differentiate creation/update
src/protagonist/API/Features/Image/Validation/HydraImageValidator.cs
Outdated
Show resolved
Hide resolved
src/protagonist/API/Features/Image/Validation/HydraImageValidator.cs
Outdated
Show resolved
Hide resolved
src/protagonist/Engine.Tests/Ingest/Image/Appetiser/AppetiserClientTests.cs
Outdated
Show resolved
Hide resolved
src/protagonist/Engine/Ingest/Image/Appetiser/AppetiserClient.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved - just need to delete unused param
5d41143
to
5224767
Compare
…to update fields with invalid ids'
4b83a6a
to
f4a0dd1
Compare
Resolves #340
Resolves #323
This pull request adds in the ability to restrict the characters allowed in an asset id. It does this by adding a set of 2 new settings:
RestrictedAssetIdCharacters
is a series of characters that are not allowed within an asset idDisableStrictAssetIdChecks
sets whether the check for strict asset ids is disabled. As such, this check is enabled by defaultAdditionally, this pull request enables
(
and)
characters to be used in the image id which would previously cause appetiser to fail. It manages this by replacing these characters with an alternative. By default this is an underscore, but can be set to a specific string via settings to be able to reduce the possibility of collisions