issue 162: filter clarinusermetadata/manage payload to contain only required metadata keys#164
Open
kuchtiak-ufal wants to merge 1 commit into
Conversation
…ields required by the license
There was a problem hiding this comment.
Pull request overview
This PR updates the CLARIN license agreement flow to ensure the clarinusermetadata/manage POST payload only contains metadata keys required by the currently active license definition (plus the mandatory IP), preventing stale user metadata from being resent after license requirements are changed. It also fixes validation so that the optional ORGANIZATION field is no longer enforced as mandatory user input.
Changes:
- Filter outgoing
userMetadatapayload to include only keys present in the current license’srequiredInfolist (and always addIP). - Treat
ORGANIZATIONas an optional metadata key for “required info filled” validation, while still enforcingREQUIRED_ORGANIZATION.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes (1): #162
The list of ClarinUserMetadata values is now filtered to metadata values only required by the license definition.
and
(2)the issue with "ORGANIZATION" (optional) metadata value.There are two organization metadata keys:
When the license had checked ORGANIZATION (optional), user was still enforced to fill in the value, thought the value is optional.
This was fixed as well.