Skip to content

LINDAT/Backport ufal: send only the fields the licence asks for on download - #1682

Merged
milanmajchrak merged 2 commits into
customer/lindatfrom
lindat/fe-ufal-licence-required-keys
Nov 2, 2026
Merged

milanmajchrak merged 2 commits into
customer/lindatfrom
lindat/fe-ufal-licence-required-keys

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

References

  • Backport of ufal/dspace-angular PR 163, issue 158 (ufal commit e183ad8)
  • Backport of ufal/dspace-angular PR 164, issue 162 (ufal commit a026caf)
  • BE part: dataquest-dev/DSpace PR 1594

Description

The licence agreement page sends only the fields the licence asks for, plus the IP. An empty ORGANIZATION no longer blocks "I agree".

Instructions for Reviewers

List of changes in this PR:

  • Two ufal commits cherry-picked with -x, no conflicts. ÚFAL stays the author.
  • clarin-license-agreement-page.component.ts drops user metadata whose key is not in the licence's required info, and always adds the IP, also for anonymous users.
  • The component and its spec are the same as on ufal clarin-v7.

How to test: open a file whose licence requires e.g. NAME. Fill in more fields than it asks for and click "I agree". The POST to clarinusermetadata/manage carries only NAME and IP.

AI Disclosure

  • No
  • Yes

Claude Code made the cherry-picks and wrote this description. The touched files were diffed against ufal clarin-v7.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR follows all coding best practices based on the Code Conventions Guide
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

amadulhaxxani and others added 2 commits November 2, 2026 08:57
… (ufal/dspace-angular PR 163)

* fix(license): ensure IP address is included in anonymous user payload

* test(license): add missing template dependencies to spec

(cherry picked from commit e183ad8)
…equired metadata keys (ufal/dspace-angular PR 164)

* issue 162: filter clarinusermetadata/manage payload to contain only fields required by the license

* test(license): cover required-info payload filter and optional ORGANIZATION

Spec cases for ufal/dspace-angular PR 164 on top of the ufal/dspace-angular PR 163 spec setup:
- only metadata keys required by the license (plus the current IP) are sent
- an empty ORGANIZATION does not block "I agree"; an empty
  REQUIRED_ORGANIZATION still does

Both cases fail without ufal/dspace-angular PR 164's component change.

---------

Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz>
(cherry picked from commit a026caf)
@milanmajchrak
milanmajchrak merged commit 33013a0 into customer/lindat Nov 2, 2026
5 checks passed
milanmajchrak added a commit that referenced this pull request Nov 10, 2026
…wnload (#1682) (#1696)

* fix(license): ensure IP address is included in anonymous user payload (ufal/dspace-angular PR 163)

* fix(license): ensure IP address is included in anonymous user payload

* test(license): add missing template dependencies to spec

(cherry picked from commit e183ad8)

* issue 162: filter clarinusermetadata/manage payload to contain only required metadata keys (ufal/dspace-angular PR 164)

* issue 162: filter clarinusermetadata/manage payload to contain only fields required by the license

* test(license): cover required-info payload filter and optional ORGANIZATION

Spec cases for ufal/dspace-angular PR 164 on top of the ufal/dspace-angular PR 163 spec setup:
- only metadata keys required by the license (plus the current IP) are sent
- an empty ORGANIZATION does not block "I agree"; an empty
  REQUIRED_ORGANIZATION still does

Both cases fail without ufal/dspace-angular PR 164's component change.

---------


(cherry picked from commit a026caf)

---------




(cherry picked from commit 33013a0)

Co-authored-by: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com>
Co-authored-by: Amad Ul Hassan <hassan@ufal.mff.cuni.cz>
Co-authored-by: Milan Kuchtiak <kuchtiak@ufal.mff.cuni.cz>
Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz>
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.

3 participants