Fix history is not updated when removing all privileges#9269
Merged
josegar74 merged 2 commits intoMay 9, 2026
Merged
Conversation
jodygarnett
approved these changes
May 6, 2026
Member
|
Please check this test failure: |
Member
|
I have updated locally in the services module: https://github.com/geonetwork/core-geonetwork/blob/main/services/pom.xml <dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gn-listeners</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="org.fao.geonet.listener"/>And the test works now. Please check these changes and verify that all looks fine. |
Contributor
Author
|
Thanks @josegar74, that fixed the test |
josegar74
approved these changes
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently when removing all the privileges of a record, the event is not emitted so nothing is saved in the history.
All privilege changes should be logged in the history so we can track why a record may be no longer visible.
This PR aims to fix this issue by updating the "none selected" path so the event is emitted. Then we will see the privilege in the history.
Checklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation