Align frontend and backend publication checks#9300
Merged
ianwallen merged 3 commits intoJun 16, 2026
Conversation
josegar74
reviewed
May 29, 2026
Co-authored-by: Jose García <josegar74@gmail.com>
josegar74
approved these changes
Jun 10, 2026
josegar74
left a comment
Member
There was a problem hiding this comment.
Tested and seems working fine
| public void shareMetadataForPublicationAsUserAdminWithReviewerInGroup() throws Exception { | ||
| MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); | ||
|
|
||
| // Create a user with global UserAdmin profile but per-group Reviewer in the record's group. |
Member
There was a problem hiding this comment.
Global UserAdmin profile is not something you can create, at least from the user interface. UserAdmin is related to a group. In any case, the test seems fine.
Contributor
Author
There was a problem hiding this comment.
Fixed in latest push
| public void shareMetadataForPublicationAsUserAdminWithoutReviewerInGroup() throws Exception { | ||
| MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); | ||
|
|
||
| // Create a user with global UserAdmin profile but only Editor membership in the record's group. |
Contributor
Author
There was a problem hiding this comment.
Fixed in latest push
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.
Following #9197 a user who is both Reviewer and User Admin cannot publish:

Seems to be caused by this check:
It does not consider that a user may be a reviewer as well as a user admin.
This PR aims to fix this issue by aligning permission checks performed on publication/unpublication across the ui, frontend, backend, docs and tests.
Ex. Publication:
AdministratorMETADATA_PUBLISH_USERPROFILEMETADATA_PUBLISH_USERPROFILEChecklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation