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

Register user / allow to select the group where the user wants to register #8176

Merged
merged 12 commits into from
Jun 19, 2024

Conversation

josegar74
Copy link
Member

@josegar74 josegar74 commented Jun 12, 2024

This change request extends the Register User function to allow selection of the group in which the user wants to register and enhances the registration form to indicate required fields.

selfregistration-form-1

selfregistration-form-2

The requested group is not assigned to the user when is registered, it is used in the mail to the administrator to inform about the group requested (similar as the requested profile field):

Dear Admin,
Newly registered user [[email protected]](mailto:[email protected]) has requested RegisteredUser access 
in group Sample group for http://localhost:8080/geonetwork/srv/.
Yours sincerely,
The My GeoNetwork catalogue team.

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

Thanks to GeoCat Live for implementation and funding by ECCC

@josegar74 josegar74 added this to the 4.4.6 milestone Jun 12, 2024
@josegar74 josegar74 force-pushed the 44-registeruser-grouprequested branch from d2e729c to aef5ee5 Compare June 12, 2024 15:01
@josegar74 josegar74 force-pushed the 44-registeruser-grouprequested branch from 4eece29 to 0b56ac7 Compare June 12, 2024 17:08
@josegar74 josegar74 changed the title Register user / allow to select the group that wishes to register Register user / allow to select the group where the user wants to register Jun 12, 2024
Copy link
Contributor

@jodygarnett jodygarnett left a comment

Choose a reason for hiding this comment

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

Suggestions only.

I cannot see where to suggestion language shown in the screen snap:

BEFORE:

When you request an account an email will be sent to you with your user details.
If an advanced user profile is requested, the catalogue administrator will analyze your request and get back to you.

AFTER:

When registering an email will be sent to you with account details.
The catalogue administrator will review group and profile requests.

@josegar74
Copy link
Member Author

Suggestions only.

I cannot see where to suggestion language shown in the screen snap:

BEFORE:

When you request an account an email will be sent to you with your user details.
If an advanced user profile is requested, the catalogue administrator will analyze your request and get back to you.

AFTER:

When registering an email will be sent to you with account details.
The catalogue administrator will review group and profile requests.

@jody, I've updated the text in 0be8d30

@fxprunayre fxprunayre merged commit e79f2a3 into geonetwork:main Jun 19, 2024
5 of 6 checks passed
@geonetworkbuild
Copy link
Collaborator

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 128
stderr
error: commit 400a2070cb8d5b3b6262b1f542da3499225c1efa is a merge but no -m option was given.
fatal: cherry-pick failed

stdout
Auto-merging web-ui/src/main/resources/catalog/locales/en-core.json
[backport-8176-to-4.2.x e82f2e3519] Register user / allow to select the group that wishes to register
 Author: Jose García <[email protected]>
 Date: Wed Jun 12 15:54:47 2024 +0200
 11 files changed, 235 insertions(+), 50 deletions(-)
Auto-merging services/pom.xml
[backport-8176-to-4.2.x 2b0ec3913a] Register user / API integration tests
 Author: Jose García <[email protected]>
 Date: Wed Jun 12 17:54:19 2024 +0200
 2 files changed, 175 insertions(+)
 create mode 100644 services/src/test/java/org/fao/geonet/api/users/RegisterApiTest.java
[backport-8176-to-4.2.x d32a323ee0] Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages.properties
 Author: Jose García <[email protected]>
 Date: Thu Jun 13 08:25:52 2024 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[backport-8176-to-4.2.x 7ff893777a] Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages_fre.properties
 Author: Jose García <[email protected]>
 Date: Thu Jun 13 08:26:01 2024 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[backport-8176-to-4.2.x a2814e8fdd] Update core/src/test/resources/org/fao/geonet/api/Messages.properties
 Author: Jose García <[email protected]>
 Date: Thu Jun 13 08:26:09 2024 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[backport-8176-to-4.2.x aefeda2ff1] Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties
 Author: Jose García <[email protected]>
 Date: Thu Jun 13 08:26:22 2024 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[backport-8176-to-4.2.x 76d69c702d] Register user / disable group selection for profile Administrator
 Author: Jose García <[email protected]>
 Date: Thu Jun 13 10:50:25 2024 +0200
 2 files changed, 9 insertions(+)

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-8176-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick aef5ee599c21f61edc947c878ef3e7d71bd48973,0b56ac74ee7bb26f042cbb9bdd7f04c529484f67,77acc49094fdb23e6746cb1439ef41efee068ff4,d2f0d3a218c91157974c487db50bf8c717363cbf,89095c06e51cbb853ac557b026f5f06d88d2da59,5ac734f4d673abda2b90bdd8391ab23df8955517,6490fd7f01bb56686238ba3fecc04b1db9444940,400a2070cb8d5b3b6262b1f542da3499225c1efa,aa87a7de3a21c64ed2706bc0e3967577b0893d2f,bf1df80ff8f4428a5a24f205a526efb81fd1863c,0be8d3077a5ce24bb6cb64ff5e4940f181f03171,92e6b42bdb462c93c36dd3f3e65e1da4f26c8994
# Push it to GitHub
git push --set-upstream origin backport-8176-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-8176-to-4.2.x.

josegar74 added a commit to GeoCat/core-geonetwork that referenced this pull request Jun 19, 2024
…ister (geonetwork#8176)

* Register user / allow to select the group that wishes to register

* Register user / API integration tests

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: Jody Garnett <[email protected]>

* Register user / disable group selection for profile Administrator

* Register user / form improvements

* Register user / surname not required

* Register user / Update new account text

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: François Prunayre <[email protected]>

---------

Co-authored-by: Jody Garnett <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
josegar74 added a commit that referenced this pull request Jun 19, 2024
…user wants to register (#8195)

* Register user / allow to select the group where the user wants to register (#8176)

* Register user / allow to select the group that wishes to register

* Register user / API integration tests

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: Jody Garnett <[email protected]>

* Register user / disable group selection for profile Administrator

* Register user / form improvements

* Register user / surname not required

* Register user / Update new account text

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: François Prunayre <[email protected]>

---------

Co-authored-by: Jody Garnett <[email protected]>
Co-authored-by: François Prunayre <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages_fre.properties

---------

Co-authored-by: Jody Garnett <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
fxprunayre added a commit to SPW-DIG/metawal-core-geonetwork that referenced this pull request Jul 18, 2024
…ister (geonetwork#8176)

* Register user / allow to select the group that wishes to register

* Register user / API integration tests

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update web/src/main/webapp/WEB-INF/classes/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages.properties

Co-authored-by: Jody Garnett <[email protected]>

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: Jody Garnett <[email protected]>

* Register user / disable group selection for profile Administrator

* Register user / form improvements

* Register user / surname not required

* Register user / Update new account text

* Update core/src/test/resources/org/fao/geonet/api/Messages_fre.properties

Co-authored-by: François Prunayre <[email protected]>

---------

Co-authored-by: Jody Garnett <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
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.

4 participants