Skip to content

issue 162: filter clarinusermetadata/manage payload to contain only required metadata keys#164

Open
kuchtiak-ufal wants to merge 1 commit into
clarin-v7from
issue_#162_invalid_payload_when_clarin_licens_is_accepted
Open

issue 162: filter clarinusermetadata/manage payload to contain only required metadata keys#164
kuchtiak-ufal wants to merge 1 commit into
clarin-v7from
issue_#162_invalid_payload_when_clarin_licens_is_accepted

Conversation

@kuchtiak-ufal

Copy link
Copy Markdown

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:

ORGANIZATION (optional)
REQUIRED_ORGANIZATION (mandatory)

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 userMetadata payload to include only keys present in the current license’s requiredInfo list (and always add IP).
  • Treat ORGANIZATION as an optional metadata key for “required info filled” validation, while still enforcing REQUIRED_ORGANIZATION.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad request payload for non-anonymous user confirming the license

2 participants