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

Inconsistencie for editors submitting records for review #8012

Open
archaeogeek opened this issue May 2, 2024 · 0 comments
Open

Inconsistencie for editors submitting records for review #8012

archaeogeek opened this issue May 2, 2024 · 0 comments

Comments

@archaeogeek
Copy link
Contributor

Describe the bug
GeoNetwork 4.2.9: There are a couple of inconsistencies in the process for editors submitting a record for review when workflow is enabled. Firstly when submitting for review from the default record view, it is only possible to submit a review if the editor is also the owner. The submit button is greyed out, but in the log file there is an error:

Possibly unhandled rejection: {"data":{"message":"Only the owner of the metadata can get the status. User is not the owner of the metadata","code":"forbidden","description":null},"status":403,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"../eng/../api/records/2233/status/workflow/last","headers":{"Accept":"application/json, text/plain, */*","Accept-Language":"eng","X-XSRF-TOKEN":"d638d6ef-1b76-4c5f-b930-87411e68f0cb"}},"statusText":"Forbidden","xhrStatus":"complete"}

Then, when editing a record, even one that they don't own, an editor can submit a record for review, in contradiction to the above, but they can't add a message.

Expected behavior
Consistent permissions behaviour in both cases with the option to add a message in both cases.

It seems to be this bit of code that is triggering the error in default record view: https://github.com/geonetwork/core-geonetwork/blob/4.2.x/services/src/main/java/org/fao/geonet/api/records/MetadataWorkflowApi.java#L229

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

No branches or pull requests

1 participant