diff --git a/core/src/test/resources/org/fao/geonet/api/Messages.properties b/core/src/test/resources/org/fao/geonet/api/Messages.properties index 9bd5be836db..1cde2820cbb 100644 --- a/core/src/test/resources/org/fao/geonet/api/Messages.properties +++ b/core/src/test/resources/org/fao/geonet/api/Messages.properties @@ -61,6 +61,10 @@ register_email_admin_message=Dear Admin,\n\ Newly registered user %s has requested %s access for %s.\n\ Yours sincerely,\n\ The %s team. +register_email_group_admin_message=Dear Admin,\n\ + Newly registered user %s has requested %s access in group %s for %s.\n\ + Yours sincerely,\n\ + The %s team. register_email_subject=%s / Your account as %s register_email_message=Dear User,\n\ Your registration at %s was successful.\n\ @@ -77,6 +81,21 @@ register_email_message=Dear User,\n\ \n\ Yours sincerely,\n\ The %s team. +register_email_group_message=Dear User,\n\ + Your registration at %s was successful.\n\ + Your account is: \n\ + * username: %s\n\ + * password: %s\n\ + * profile: %s\n\ + \n\ + We have sent your request for %s to the group %s administrator. You will be contacted shortly.\n\ + To log in and access your account, please click on the link below.\n\ + %s\n\ + \n\ + Thanks for your registration.\n\ + \n\ + Yours sincerely,\n\ + The %s team. new_user_rating=%s / New user rating on %s new_user_rating_text=See record %s user_feedback_title=%s / User feedback on %s / %s diff --git a/core/src/test/resources/org/fao/geonet/api/Messages_fre.properties b/core/src/test/resources/org/fao/geonet/api/Messages_fre.properties index 6abe49058d6..55a00915b44 100644 --- a/core/src/test/resources/org/fao/geonet/api/Messages_fre.properties +++ b/core/src/test/resources/org/fao/geonet/api/Messages_fre.properties @@ -52,6 +52,10 @@ register_email_admin_message=Cher administrateur,\n\ L'utilisateur %s vient de demander une cr\u00E9ation de compte pour %s.\n\ Salutation,\n\ L'\u00E9quipe %s. +register_email_group_admin_message=Cher administrateur,\n\ + L'utilisateur %s vient de demander une cr\u00E9ation de compte pour %s en groupe %s.\n\ + Salutation,\n\ + L'\u00E9quipe %s. register_email_subject=%s / Votre compte %s register_email_message=Cher utilisateur,\n\ Votre compte a \u00E9t\u00E9 cr\u00E9\u00E9 avec succ\u00E9s pour %s.\n\ @@ -65,6 +69,18 @@ register_email_message=Cher utilisateur,\n\ \n\ Salutations,\n\ L'\u00E9quipe %s. +register_email_group_message=Cher utilisateur,\n\ + Votre compte a \u00E9t\u00E9 cr\u00E9\u00E9 avec succ\u00E9s pour %s.\n\ + * Nom d'utilisateur : %s\n\ + * Mot de passe : %s\n\ + * Profil : %s\n\ + \n\ +Nous avons envoy\u00E9 votre demande de %s à l'administrateur du groupe %s. Vous serez contact\u00E9 rapidement.\n\ + Vous pouvez d\u00E9s \u00E0 pr\u00E9sent vous connecter.\n\ + %s\n\ + \n\ + Salutations,\n\ + L'\u00E9quipe %s. new_user_rating=%s / Nouvelle \u00E9valuation faite pour %s new_user_rating_text=Consulter la fiche %s user_feedback_title=%s / Nouveau commentaire sur %s / %s diff --git a/docs/manual/docs/administrator-guide/managing-users-and-groups/img/selfregistration-form.png b/docs/manual/docs/administrator-guide/managing-users-and-groups/img/selfregistration-form.png index 09321a4e4b5..d718b94a019 100644 Binary files a/docs/manual/docs/administrator-guide/managing-users-and-groups/img/selfregistration-form.png and b/docs/manual/docs/administrator-guide/managing-users-and-groups/img/selfregistration-form.png differ diff --git a/docs/manual/docs/administrator-guide/managing-users-and-groups/user-self-registration.md b/docs/manual/docs/administrator-guide/managing-users-and-groups/user-self-registration.md index 2594a81f727..fe3cb2d0142 100644 --- a/docs/manual/docs/administrator-guide/managing-users-and-groups/user-self-registration.md +++ b/docs/manual/docs/administrator-guide/managing-users-and-groups/user-self-registration.md @@ -11,9 +11,12 @@ Click the `Create an account` button and fill out the registration form: The fields in this form are self-explanatory except for the following: - **Email**: The user's email address. This is mandatory and will be used as the username. -- **Profile**: By default, self-registered users are given the `Registered User` profile (see previous section). If any other profile is selected: +- **Requested profile**: By default, self-registered users are given the `Registered User` profile (see previous section). If any other profile is selected: - the user will still be given the `Registered User` profile - an email will be sent to the Email address nominated in the Feedback section of the 'System Administration' menu, informing them of the request for a more privileged profile +- **Requested group**: By default, self-registered users are not assigned to any group. If a group is selected: + - the user will still not be assigned to any group + - an email will be sent to the Email address nominated in the Feedback section of the 'System Administration' menu, informing them of the requested group. ## What happens when a user self-registers? diff --git a/services/pom.xml b/services/pom.xml index 08a35139de6..e0ccd7873f1 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -48,6 +48,14 @@ test + + + org.jvnet.mock-javamail + mock-javamail + 1.9 + test + + org.springframework spring-web @@ -391,6 +399,17 @@ + + + maven-surefire-plugin + + + org.jvnet.mock_javamail.MockTransport + org.jvnet.mock_javamail.MockStore + org.jvnet.mock_javamail.MockStore + + + diff --git a/services/src/main/java/org/fao/geonet/api/users/RegisterApi.java b/services/src/main/java/org/fao/geonet/api/users/RegisterApi.java index e5eeb703f1d..848f6e53e5d 100644 --- a/services/src/main/java/org/fao/geonet/api/users/RegisterApi.java +++ b/services/src/main/java/org/fao/geonet/api/users/RegisterApi.java @@ -1,5 +1,5 @@ //============================================================================= -//=== Copyright (C) 2001-2021 Food and Agriculture Organization of the +//=== Copyright (C) 2001-2024 Food and Agriculture Organization of the //=== United Nations (FAO-UN), United Nations World Food Programme (WFP) //=== and United Nations Environment Programme (UNEP) //=== @@ -26,7 +26,6 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jeeves.server.context.ServiceContext; -import org.fao.geonet.api.API; import org.fao.geonet.api.ApiUtils; import org.fao.geonet.api.tools.i18n.LanguageUtils; import org.fao.geonet.api.users.model.UserRegisterDto; @@ -45,17 +44,14 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import javax.servlet.http.HttpServletRequest; -import java.sql.SQLException; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.ResourceBundle; +import java.util.*; @EnableWebMvc @Service @@ -72,12 +68,20 @@ public class RegisterApi { @Autowired(required=false) SecurityProviderConfiguration securityProviderConfiguration; + @Autowired + GroupRepository groupRepository; + + @Autowired + UserGroupRepository userGroupRepository; + + @Autowired + SettingManager settingManager; + @io.swagger.v3.oas.annotations.Operation(summary = "Create user account", description = "User is created with a registered user profile. username field is ignored and the email is used as " + "username. Password is sent by email. Catalog administrator is also notified.") - @RequestMapping( + @PutMapping( value = "/actions/register", - method = RequestMethod.PUT, produces = MediaType.TEXT_PLAIN_VALUE) @ResponseStatus(value = HttpStatus.CREATED) @ResponseBody @@ -101,19 +105,18 @@ public ResponseEntity registerUser( ServiceContext context = ApiUtils.createServiceContext(request); - SettingManager sm = context.getBean(SettingManager.class); - boolean selfRegistrationEnabled = sm.getValueAsBool(Settings.SYSTEM_USERSELFREGISTRATION_ENABLE); + boolean selfRegistrationEnabled = settingManager.getValueAsBool(Settings.SYSTEM_USERSELFREGISTRATION_ENABLE); if (!selfRegistrationEnabled) { return new ResponseEntity<>(String.format( messages.getString("self_registration_disabled") ), HttpStatus.PRECONDITION_FAILED); } - boolean recaptchaEnabled = sm.getValueAsBool(Settings.SYSTEM_USERSELFREGISTRATION_RECAPTCHA_ENABLE); + boolean recaptchaEnabled = settingManager.getValueAsBool(Settings.SYSTEM_USERSELFREGISTRATION_RECAPTCHA_ENABLE); if (recaptchaEnabled) { boolean validRecaptcha = RecaptchaChecker.verify(userRegisterDto.getCaptcha(), - sm.getValue(Settings.SYSTEM_USERSELFREGISTRATION_RECAPTCHA_SECRETKEY)); + settingManager.getValue(Settings.SYSTEM_USERSELFREGISTRATION_RECAPTCHA_SECRETKEY)); if (!validRecaptcha) { return new ResponseEntity<>( messages.getString("recaptcha_not_valid"), HttpStatus.PRECONDITION_FAILED); @@ -144,7 +147,7 @@ public ResponseEntity registerUser( ), HttpStatus.PRECONDITION_FAILED); } - if (userRepository.findByUsernameIgnoreCase(userRegisterDto.getEmail()).size() != 0) { + if (!userRepository.findByUsernameIgnoreCase(userRegisterDto.getEmail()).isEmpty()) { // username is ignored and the email is used as username in selfregister return new ResponseEntity<>(String.format( messages.getString("user_with_that_username_found"), @@ -153,8 +156,6 @@ public ResponseEntity registerUser( } User user = new User(); - - // user.setUsername(userRegisterDto.getUsername()); user.setName(userRegisterDto.getName()); user.setSurname(userRegisterDto.getSurname()); user.setOrganisation(userRegisterDto.getOrganisation()); @@ -162,7 +163,6 @@ public ResponseEntity registerUser( user.getAddresses().add(userRegisterDto.getAddress()); user.getEmailAddresses().add(userRegisterDto.getEmail()); - String password = User.getRandomPassword(); user.getSecurity().setPassword( PasswordUtil.encode(context, password) @@ -172,48 +172,78 @@ public ResponseEntity registerUser( user.setProfile(Profile.RegisteredUser); user = userRepository.save(user); - Group targetGroup = getGroup(context); + Group targetGroup = getGroup(); + if (targetGroup != null) { UserGroup userGroup = new UserGroup().setUser(user).setGroup(targetGroup).setProfile(Profile.RegisteredUser); - context.getBean(UserGroupRepository.class).save(userGroup); + userGroupRepository.save(userGroup); } - - String catalogAdminEmail = sm.getValue(Settings.SYSTEM_FEEDBACK_EMAIL); + String catalogAdminEmail = settingManager.getValue(Settings.SYSTEM_FEEDBACK_EMAIL); String subject = String.format( messages.getString("register_email_admin_subject"), - sm.getSiteName(), + settingManager.getSiteName(), user.getEmail(), requestedProfile ); - String message = String.format( - messages.getString("register_email_admin_message"), - user.getEmail(), - requestedProfile, - sm.getNodeURL(), - sm.getSiteName() - ); - if (!MailUtil.sendMail(catalogAdminEmail, subject, message, null, sm)) { + Group requestedGroup = getRequestedGroup(userRegisterDto.getGroup()); + String message; + if (requestedGroup != null) { + message = String.format( + messages.getString("register_email_group_admin_message"), + user.getEmail(), + requestedProfile, + requestedGroup.getLabelTranslations().get(context.getLanguage()), + settingManager.getNodeURL(), + settingManager.getSiteName() + ); + } else { + message = String.format( + messages.getString("register_email_admin_message"), + user.getEmail(), + requestedProfile, + settingManager.getNodeURL(), + settingManager.getSiteName() + ); + + } + + if (Boolean.FALSE.equals(MailUtil.sendMail(catalogAdminEmail, subject, message, null, settingManager))) { return new ResponseEntity<>(String.format( messages.getString("mail_error")), HttpStatus.PRECONDITION_FAILED); } subject = String.format( messages.getString("register_email_subject"), - sm.getSiteName(), + settingManager.getSiteName(), user.getProfile() ); - message = String.format( - messages.getString("register_email_message"), - sm.getSiteName(), - user.getUsername(), - password, - Profile.RegisteredUser, - requestedProfile, - sm.getNodeURL(), - sm.getSiteName() - ); - if (!MailUtil.sendMail(user.getEmail(), subject, message, null, sm)) { + if (requestedGroup != null) { + message = String.format( + messages.getString("register_email_group_message"), + settingManager.getSiteName(), + user.getUsername(), + password, + Profile.RegisteredUser, + requestedProfile, + requestedGroup.getLabelTranslations().get(context.getLanguage()), + settingManager.getNodeURL(), + settingManager.getSiteName() + ); + } else { + message = String.format( + messages.getString("register_email_message"), + settingManager.getSiteName(), + user.getUsername(), + password, + Profile.RegisteredUser, + requestedProfile, + settingManager.getNodeURL(), + settingManager.getSiteName() + ); + } + + if (Boolean.FALSE.equals(MailUtil.sendMail(user.getEmail(), subject, message, null, settingManager))) { return new ResponseEntity<>(String.format( messages.getString("mail_error")), HttpStatus.PRECONDITION_FAILED); } @@ -224,8 +254,39 @@ public ResponseEntity registerUser( ), HttpStatus.CREATED); } - Group getGroup(ServiceContext context) throws SQLException { - final GroupRepository bean = context.getBean(GroupRepository.class); - return bean.findById(ReservedGroup.guest.getId()).get(); + /** + * Returns the group (GUEST) to assign to the registered user. + * + * @return + */ + private Group getGroup() { + Optional targetGroupOpt = groupRepository.findById(ReservedGroup.guest.getId()); + + if (targetGroupOpt.isPresent()) { + return targetGroupOpt.get(); + } + + return null; + } + + /** + * Returns the group requested by the registered user. + * + * @param requestedGroup Requested group identifier for the user. + * @return + */ + private Group getRequestedGroup(String requestedGroup) { + Group targetGroup = null; + + if (StringUtils.hasLength(requestedGroup)) { + Optional targetGroupOpt = groupRepository.findById(Integer.parseInt(requestedGroup)); + + // Don't allow reserved groups + if (targetGroupOpt.isPresent() && !targetGroupOpt.get().isReserved()) { + targetGroup = targetGroupOpt.get(); + } + } + + return targetGroup; } } diff --git a/services/src/main/java/org/fao/geonet/api/users/model/UserRegisterDto.java b/services/src/main/java/org/fao/geonet/api/users/model/UserRegisterDto.java index c77a7b66b6c..5131c99a241 100644 --- a/services/src/main/java/org/fao/geonet/api/users/model/UserRegisterDto.java +++ b/services/src/main/java/org/fao/geonet/api/users/model/UserRegisterDto.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2016 Food and Agriculture Organization of the + * Copyright (C) 2001-2024 Food and Agriculture Organization of the * United Nations (FAO-UN), United Nations World Food Programme (WFP) * and United Nations Environment Programme (UNEP) * @@ -27,7 +27,6 @@ /** * DTO class for user register information. * - * @author Jose García */ public class UserRegisterDto { private String profile; @@ -39,6 +38,8 @@ public class UserRegisterDto { private Address address; private String captcha; + private String group; + public String getProfile() { return profile; } @@ -103,6 +104,14 @@ public void setCaptcha(String captcha) { this.captcha = captcha; } + public String getGroup() { + return group; + } + + public void setGroup(String group) { + this.group = group; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -110,6 +119,7 @@ public boolean equals(Object o) { UserRegisterDto that = (UserRegisterDto) o; + if (group != null ? !group.equals(that.group) : that.group != null) return false; if (profile != null ? !profile.equals(that.profile) : that.profile != null) return false; if (username != null ? !username.equals(that.username) : that.username != null) return false; if (email != null ? !email.equals(that.email) : that.email != null) return false; @@ -123,6 +133,7 @@ public boolean equals(Object o) { @Override public int hashCode() { int result = profile != null ? profile.hashCode() : 0; + result = 31 * result + (group != null ? group.hashCode() : 0); result = 31 * result + (username != null ? username.hashCode() : 0); result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); diff --git a/services/src/test/java/org/fao/geonet/api/users/RegisterApiTest.java b/services/src/test/java/org/fao/geonet/api/users/RegisterApiTest.java new file mode 100644 index 00000000000..c7e02ad3308 --- /dev/null +++ b/services/src/test/java/org/fao/geonet/api/users/RegisterApiTest.java @@ -0,0 +1,156 @@ +/* + * Copyright (C) 2001-2024 Food and Agriculture Organization of the + * United Nations (FAO-UN), United Nations World Food Programme (WFP) + * and United Nations Environment Programme (UNEP) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, + * Rome - Italy. email: geonetwork@osgeo.org + */ + +package org.fao.geonet.api.users; + +import com.google.gson.Gson; +import org.fao.geonet.api.users.model.UserRegisterDto; +import org.fao.geonet.domain.Profile; +import org.fao.geonet.domain.User; +import org.fao.geonet.kernel.setting.SettingManager; +import org.fao.geonet.kernel.setting.Settings; +import org.fao.geonet.services.AbstractServiceIntegrationTest; +import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.mock.web.MockHttpSession; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.web.context.WebApplicationContext; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + +public class RegisterApiTest extends AbstractServiceIntegrationTest { + @Autowired + private WebApplicationContext wac; + + @Autowired + private SettingManager settingManager; + + @Autowired + StandardPBEStringEncryptor encryptor; + + private MockMvc mockMvc; + + private MockHttpSession mockHttpSession; + + + @Test + public void testFeatureDisabled() throws Exception { + encryptor.initialize(); + + settingManager.setValue(Settings.SYSTEM_USERSELFREGISTRATION_ENABLE, false); + + this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); + this.mockHttpSession = loginAsAnonymous(); + + UserRegisterDto userRegister = new UserRegisterDto(); + userRegister.setName("John"); + userRegister.setSurname("Doe"); + userRegister.setUsername("test@mail.com"); + userRegister.setEmail("test@mail.com"); + userRegister.setProfile("Editor"); + userRegister.setGroup("2"); + + Gson gson = new Gson(); + String json = gson.toJson(userRegister); + + this.mockMvc.perform(put("/srv/api/user/actions/register") + .session(this.mockHttpSession) + .content(json) + .contentType(API_JSON_EXPECTED_ENCODING) + .accept(MediaType.parseMediaType("text/plain"))) + .andExpect(status().isPreconditionFailed()); + } + + @Test + public void testCreateUser() throws Exception { + encryptor.initialize(); + + settingManager.setValue(Settings.SYSTEM_USERSELFREGISTRATION_ENABLE, true); + settingManager.setValue(Settings.SYSTEM_FEEDBACK_MAILSERVER_HOST, "localhost"); + settingManager.setValue(Settings.SYSTEM_FEEDBACK_MAILSERVER_PORT, "25"); + + this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); + this.mockHttpSession = loginAsAnonymous(); + + UserRegisterDto userRegister = new UserRegisterDto(); + userRegister.setName("John"); + userRegister.setSurname("Doe"); + userRegister.setUsername("test@mail.com"); + userRegister.setEmail("test@mail.com"); + userRegister.setProfile("Editor"); + userRegister.setGroup("2"); + + Gson gson = new Gson(); + String json = gson.toJson(userRegister); + + this.mockMvc.perform(put("/srv/api/user/actions/register") + .session(this.mockHttpSession) + .content(json) + .contentType(API_JSON_EXPECTED_ENCODING) + .accept(MediaType.parseMediaType("text/plain"))) + .andExpect(status().isCreated()) + .andExpect(content().string(String.format("User '%s' registered.", userRegister.getUsername()))) + .andReturn(); + } + + + @Test + public void testCreateExistingUser() throws Exception { + encryptor.initialize(); + + settingManager.setValue(Settings.SYSTEM_USERSELFREGISTRATION_ENABLE, true); + settingManager.setValue(Settings.SYSTEM_FEEDBACK_MAILSERVER_HOST, "localhost"); + settingManager.setValue(Settings.SYSTEM_FEEDBACK_MAILSERVER_PORT, "25"); + + User testUserEditor2 = new User(); + testUserEditor2.setUsername("test@mail.com"); + testUserEditor2.setProfile(Profile.Editor); + testUserEditor2.setEnabled(true); + _userRepo.save(testUserEditor2); + + this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); + this.mockHttpSession = loginAsAnonymous(); + + UserRegisterDto userRegister = new UserRegisterDto(); + userRegister.setName("John"); + userRegister.setSurname("Doe"); + userRegister.setUsername("test@mail.com"); + userRegister.setEmail("test@mail.com"); + userRegister.setProfile("Editor"); + userRegister.setGroup("2"); + + Gson gson = new Gson(); + String json = gson.toJson(userRegister); + + this.mockMvc.perform(put("/srv/api/user/actions/register") + .content(json) + .contentType(API_JSON_EXPECTED_ENCODING) + .session(this.mockHttpSession) + .accept(MediaType.parseMediaType("text/plain"))) + .andExpect(status().isPreconditionFailed()); + } +} diff --git a/web-ui/src/main/resources/catalog/js/LoginController.js b/web-ui/src/main/resources/catalog/js/LoginController.js index ec4df79ad46..9a6a5de8f80 100644 --- a/web-ui/src/main/resources/catalog/js/LoginController.js +++ b/web-ui/src/main/resources/catalog/js/LoginController.js @@ -101,6 +101,8 @@ $scope.userToRemind = gnUtilityService.getUrlParameter("username"); $scope.changeKey = gnUtilityService.getUrlParameter("changeKey"); } + + $scope.retrieveGroups(); } // TODO: https://github.com/angular/angular.js/issues/1460 @@ -134,6 +136,7 @@ email: "", organisation: "", profile: "RegisteredUser", + group: "", address: { address: "", city: "", @@ -143,6 +146,21 @@ } }; + $scope.retrieveGroups = function () { + $http.get("../api/groups").then( + function (response) { + $scope.groups = response.data; + }, + function (response) {} + ); + }; + + $scope.updateGroupSelection = function () { + if ($scope.userInfo.profile === "Administrator") { + $scope.userInfo.group = ""; + } + }; + $scope.register = function () { if ($scope.recaptchaEnabled) { if (vcRecaptchaService.getResponse() === "") { diff --git a/web-ui/src/main/resources/catalog/locales/en-core.json b/web-ui/src/main/resources/catalog/locales/en-core.json index 834426eec24..e18cb2c1325 100644 --- a/web-ui/src/main/resources/catalog/locales/en-core.json +++ b/web-ui/src/main/resources/catalog/locales/en-core.json @@ -170,7 +170,7 @@ "needAnAccount": "Need an account?", "needAnAccountInfo": "Then sign right up, it only takes a minute.", "needHelp": "Need help", - "newAccountInfo": "When you request an account an email will be sent to you with your user details. If an advanced user profile is requested, the catalog administrator will analyze your request and get back to you.", + "newAccountInfo": "When registering, an email will be sent to you with account details. The catalogue administrator will review group and profile requests.", "next": "Next", "noFileSelected": "No file selected", "noRecordFound": "No record found.", @@ -234,6 +234,7 @@ "register": "Register", "rememberMe": "Remember me", "requestedProfile": "Requested profile", + "requestedGroup": "Requested group", "resetPassword": "Reset password", "resetPasswordTitle": "Reset {{user}} password.", "resetPasswordError": "Error occurred while resetting password", diff --git a/web-ui/src/main/resources/catalog/templates/new-account.html b/web-ui/src/main/resources/catalog/templates/new-account.html index 2b6e10404ff..9b6323c54df 100644 --- a/web-ui/src/main/resources/catalog/templates/new-account.html +++ b/web-ui/src/main/resources/catalog/templates/new-account.html @@ -6,97 +6,141 @@

createAnAccount

newAccountInfo

-
+
personal -
+
- +
-
- +
+
- +
- +
+ +
+ + +
address
- +
- +
- + createAnAccount
- + createAnAccount