Skip to content
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

Formatter / Use portal filter #8263

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

josegar74
Copy link
Member

Analog to #7890, but for formatters.

Refactored the code to reuse it in CSW and formatters.

Test case:

  1. Load the iso19139 samples
  2. Create an iso19139 metadata
  3. Create a portal with the name external and a filter -uuid:UUIDVALUE, with the UUID of the metadata from 2), to display all metadata except the one created in 2).
  4. In the portal switcher, select the external portal -> The metadata created in 2) is not displayed
  5. In the portal switcher, select the main srv portal -> The metadata created in 2) is displayed
  6. Request a formatter in the main srv portal --> The metadata formatter is displayed

http://localhost:8080/geonetwork/srv/api/records/UUIDVALUE/formatters/json?addSchemaLocation=true&increasePopularity=true&approved=true

  1. Request a formatter in the main external portal

http://localhost:8080/geonetwork/external/api/records/UUIDVALUE/formatters/json?addSchemaLocation=true&increasePopularity=true&approved=true

  • Without the fix: the formatter is displayed
  • With the fix: an error 403 is returned

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 added this to the 4.4.6 milestone Jul 18, 2024
@josegar74 josegar74 force-pushed the 44-formatter-portal-check branch 2 times, most recently from 55bb1e3 to 1688caf Compare July 25, 2024 13:33
@fxprunayre fxprunayre modified the milestones: 4.4.6, 4.4.7 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants