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

Fix privileges cannot be unset #8609

Merged

Conversation

tylerjmchugh
Copy link
Contributor

Currently privileges cannot be unset from the Manage Record > Privileges UI.

The issue occurs when list of operations to exclude from deletion is empty. Passing an empty list seems to cause no operations to be deleted instead of all operations for certain database types. H2 does not have this issue however PostgreSQL does.

This PR aims to fix this issue by deleting all operations when the excludes list is empty instead of passing the empty list.

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

@tylerjmchugh tylerjmchugh changed the title delete all if the excludes list is empty Fix privileges cannot be unset Jan 21, 2025
@ianwallen ianwallen added this to the 4.4.7 milestone Jan 21, 2025
@josegar74 josegar74 self-requested a review January 22, 2025 09:01
Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

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

I can reproduce the issue, tested the fix with H2 and Postgres and both seem fine.

@ianwallen ianwallen merged commit 987d5dd into geonetwork:main Jan 22, 2025
8 checks passed
@ianwallen ianwallen added the bug label Jan 22, 2025
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