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

Assign doi task as non-admin #8472

Open
f-necas opened this issue Oct 29, 2024 · 2 comments
Open

Assign doi task as non-admin #8472

f-necas opened this issue Oct 29, 2024 · 2 comments

Comments

@f-necas
Copy link
Contributor

f-necas commented Oct 29, 2024

Describe the bug
When a Reviewer (or less privileges) user tries to create a DOI, it only shows himself in task owner list.

To Reproduce
Steps to reproduce the behavior:

  1. Add DOI to GN
  2. Connect with a REVIEWER user
  3. Make a DOI creation request
  4. Only logged in user is listed.

Expected behavior
It should display the list of admin and reviewer (?) users.

Screenshots
image

Desktop (please complete the following information):

  • GeoNetwork Version : 4.4.6

Same as #6152

@pmauduit
Copy link
Contributor

The UI is requesting the /srv/api/users endpoint which returns every users only if the connected user is in the Administrator profile, otherwise:

  • if the user is of UserAdmin profile, then the users of all groups where current user is of profile UserAdmin are returned.
  • else, only the connected user is returned.

Related code here https://github.com/geonetwork/core-geonetwork/blob/main/services/src/main/java/org/fao/geonet/api/users/UsersApi.java#L136-L169

Maybe we should consider that reviewers of the group should be able to ask for a DOI creation request, so leveraging reviewers to useradmins for this specific call ? e.g. switching from:

        } else if (Profile.UserAdmin.equals(profile)) {

to:

        } else if (Profile.UserAdmin.equals(profile) || Profile.Reviewer.equals(profile)) {

But maybe in the default GN workflow, this was the reason for having a UserAdmin profiles in groups ?

@pmauduit
Copy link
Contributor

I think the user interface might deserve a dedicated endpoint to add every relevant users to the list, instead of using /srv/api/users which is a bit restrictive.

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

2 participants