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

Add configuration to filter out Elasticsearch fields when download or dynamic privileges are not set #7678

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

josegar74
Copy link
Member

Follow up of #6869

Test case:

  1. Create an ISO19139 metadata and add 3 types of online resources:
  • Link
  • File to download
  • WMS
  1. Set the View privilege only to the group ALL

  2. The user should see in the metadata page all 3 links.

  3. Logout

  • Without the change: the anonymous user see the File to download and WMS resources (not ok). These resources are not present in the XML, what is ok.

  • Without the change: the anonymous user doesn't see the File to download and WMS resources (ok). These resources are not present in the XML, what is ok.

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

@fxprunayre fxprunayre merged commit 3a01af3 into geonetwork:main Feb 1, 2024
8 checks passed
@geonetworkbuild
Copy link
Collaborator

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 483a5367ac... Add configuration to filter out Elasticsearch fields when download or dynamic privileges are not set
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/schema-ident.xml
Auto-merging schemas/iso19139/src/main/plugin/iso19139/schema-ident.xml
Auto-merging services/src/main/java/org/fao/geonet/api/es/EsHTTPProxy.java
CONFLICT (content): Merge conflict in services/src/main/java/org/fao/geonet/api/es/EsHTTPProxy.java

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-7678-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 483a5367ac26b139559904dd248eee6e1cf5eeb3
# Push it to GitHub
git push --set-upstream origin backport-7678-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-7678-to-4.2.x.

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