diff --git a/src/main/java/org/datasurvey/web/rest/AccountResource.java b/src/main/java/org/datasurvey/web/rest/AccountResource.java
index 6b830e9..361be3a 100644
--- a/src/main/java/org/datasurvey/web/rest/AccountResource.java
+++ b/src/main/java/org/datasurvey/web/rest/AccountResource.java
@@ -168,7 +168,11 @@ public class AccountResource {
public void requestPasswordReset(@RequestBody String mail) {
Optional user = userService.requestPasswordReset(mail);
if (user.isPresent()) {
- mailService.sendPasswordResetMail(user.get());
+ if (user.get().getFirstName() == null || (!user.get().getFirstName().equals("IsGoogle"))) {
+ mailService.sendPasswordResetMail(user.get());
+ } else {
+ throw new UserIsGoogleException();
+ }
} else {
// Pretend the request has been successful to prevent checking which emails really exist
// but log that an invalid attempt has been made
diff --git a/src/main/java/org/datasurvey/web/rest/errors/ErrorConstants.java b/src/main/java/org/datasurvey/web/rest/errors/ErrorConstants.java
index 109466d..6ae058c 100644
--- a/src/main/java/org/datasurvey/web/rest/errors/ErrorConstants.java
+++ b/src/main/java/org/datasurvey/web/rest/errors/ErrorConstants.java
@@ -13,6 +13,7 @@ public final class ErrorConstants {
public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used");
public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used");
public static final URI EMAIL_NOT_EXISTS_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-exists");
+ public static final URI USER_IS_GOOGLE_TYOE = URI.create(PROBLEM_BASE_URL + "/user-is-google");
private ErrorConstants() {}
}
diff --git a/src/main/java/org/datasurvey/web/rest/errors/UserIsGoogleException.java b/src/main/java/org/datasurvey/web/rest/errors/UserIsGoogleException.java
new file mode 100644
index 0000000..3ab193b
--- /dev/null
+++ b/src/main/java/org/datasurvey/web/rest/errors/UserIsGoogleException.java
@@ -0,0 +1,10 @@
+package org.datasurvey.web.rest.errors;
+
+public class UserIsGoogleException extends BadRequestAlertException {
+
+ private static final long serialVersionUID = 1L;
+
+ public UserIsGoogleException() {
+ super(ErrorConstants.USER_IS_GOOGLE_TYOE, "User Is Google", "userManagement", "userisgoogle");
+ }
+}
diff --git a/src/main/resources/i18n/messages_es.properties b/src/main/resources/i18n/messages_es.properties
index 5742030..13e5b84 100644
--- a/src/main/resources/i18n/messages_es.properties
+++ b/src/main/resources/i18n/messages_es.properties
@@ -15,13 +15,13 @@ email.signature=Equipo de DataSurvey
email.creation.text1=Su cuenta en DataSurvey ha sido creada. Por favor, haga clic en el siguiente enlace para utilizarla:
# Reset email
-email.reset.title=Reinicio de contraseña de DataSurvey
+email.reset.title=Restablecer contraseña de DataSurvey
email.reset.greeting=¡Hola, {0}!
-email.reset.text1=Se ha solicitado el reinicio de la contraseña para su cuenta en DataSurvey. Por favor, haga clic en el siguiente enlace para reiniciarla:
+email.reset.text1=Se ha solicitado una modificación de contraseña para su cuenta en DataSurvey. Por favor haga clic en el siguiente enlace para restablecerla.
email.reset.text2=Saludos,
# Password Restored Mail
-email.restored.title=Se restaleció su contraseña en DataSurvey
+email.restored.title=Se restableció su contraseña en DataSurvey
email.restored.greeting=¡Hola, {0}!
email.restored.text1=Se ha restablecido correctamente su contraseña en DataSurvey.
email.restored.text2=Saludos,
diff --git a/src/main/resources/templates/mail/activationEmail.html b/src/main/resources/templates/mail/activationEmail.html
index cd90b5a..673edc0 100644
--- a/src/main/resources/templates/mail/activationEmail.html
+++ b/src/main/resources/templates/mail/activationEmail.html
@@ -304,7 +304,7 @@
Información de contacto
- - datasurvey@gmail.com
+ - datasurveyapp@gmail.com
|
diff --git a/src/main/resources/templates/mail/creationEmail.html b/src/main/resources/templates/mail/creationEmail.html
index 2bc90eb..68b86f5 100644
--- a/src/main/resources/templates/mail/creationEmail.html
+++ b/src/main/resources/templates/mail/creationEmail.html
@@ -304,7 +304,7 @@
Información de contacto
- - datasurvey@gmail.com
+ - datasurveyapp@gmail.com
|
diff --git a/src/main/resources/templates/mail/passwordResetEmail.html b/src/main/resources/templates/mail/passwordResetEmail.html
index b235f94..1742a3f 100644
--- a/src/main/resources/templates/mail/passwordResetEmail.html
+++ b/src/main/resources/templates/mail/passwordResetEmail.html
@@ -304,7 +304,7 @@
Información de contacto
- - datasurvey@gmail.com
+ - datasurveyapp@gmail.com
|
diff --git a/src/main/resources/templates/mail/passwordRestoredEmail.html b/src/main/resources/templates/mail/passwordRestoredEmail.html
index e1c4082..6dcebd1 100644
--- a/src/main/resources/templates/mail/passwordRestoredEmail.html
+++ b/src/main/resources/templates/mail/passwordRestoredEmail.html
@@ -267,7 +267,7 @@
>If you did not make this change, please notify the following email immediately
- datasurvey@gmail.com
+ datasurveyapp@gmail.com
@@ -306,7 +306,7 @@
Información de contacto
- - datasurvey@gmail.com
+ - datasurveyapp@gmail.com
|
diff --git a/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html b/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html
index 59e46d4..56ba15c 100644
--- a/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html
+++ b/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html
@@ -27,12 +27,15 @@
- Email no exists! Please choose another one.
+ Email no exists!
+
+
+ No cuenta con el permiso de restablecer su contraseña al haber activado su cuenta por medio de Google