Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
1057827e
Commit
1057827e
authored
Sep 02, 2019
by
Matija Obreza
Browse files
Updated texts for password-reset and email-validation cancellations
parent
e83dc3dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/service/impl/EMailVerificationServiceImpl.java
View file @
1057827e
...
...
@@ -115,14 +115,16 @@ public class EMailVerificationServiceImpl implements EMailVerificationService {
}
}
/**
* User registration has been canceled. Remove user data if user not yet validated.
*/
@Override
@Transactional
public
void
cancelValidation
(
String
tokenUuid
)
throws
Exception
{
try
{
VerificationToken
verificationToken
=
tokenVerificationService
.
fetchToken
(
"email-verification"
,
tokenUuid
);
String
userUuid
=
verificationToken
.
getData
();
User
user
=
userService
.
getUser
(
UUID
.
fromString
(
userUuid
));
final
User
user
=
userService
.
getUser
(
UUID
.
fromString
(
verificationToken
.
getData
()));
if
(
user
.
hasRole
(
UserRole
.
VALIDATEDUSER
.
getName
()))
{
throw
new
InvalidApiUsageException
(
"User already validated"
);
...
...
@@ -157,7 +159,7 @@ public class EMailVerificationServiceImpl implements EMailVerificationService {
public
void
changePassword
(
final
String
tokenUuid
,
final
String
key
,
final
String
password
)
throws
NoSuchVerificationTokenException
,
PasswordPolicyException
,
TokenExpiredException
{
final
VerificationToken
consumedToken
=
tokenVerificationService
.
consumeToken
(
"email-password"
,
tokenUuid
,
key
);
final
User
user
=
userService
.
getUser
ByUuid
(
consumedToken
.
getData
());
final
User
user
=
userService
.
getUser
(
UUID
.
fromString
(
consumedToken
.
getData
())
)
;
Authentication
prevAuth
=
SecurityContextHolder
.
getContext
().
getAuthentication
();
try
{
...
...
src/main/resources/default-content/user-password-reset-canceled.json
View file @
1057827e
{
"en"
:
{
"title"
:
"Password reset
ting
canceled"
,
"body"
:
"<p>
Your password reset request
is canceled.</p>"
"title"
:
"Password reset
request
canceled"
,
"body"
:
"<p>
The request to reset the account password
is canceled.</p>"
}
}
src/main/resources/default-content/user-registration-canceled.json
View file @
1057827e
{
"en"
:
{
"title"
:
"
R
egistration
request
canceled"
,
"body"
:
"<p>
Your
registration
reques
t was canceled. Any personal information associated with
your
account w
ill be
removed from Genesys.</p>"
"title"
:
"
User account r
egistration canceled"
,
"body"
:
"<p>
The
registration
of the user accoun
t was canceled. Any personal information associated with
the
account w
as
removed from Genesys.</p>"
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment