Skip to content

Conversation

maxpeterson
Copy link
Member

@maxpeterson maxpeterson commented Nov 30, 2016

Redirect to the login when attempting to verify an email address that is already verified.

This avoids presenting the user with a 403 Forbidden error when the they click the email verification link a second time.

@maxpeterson
Copy link
Member Author

@incuna/backend please review / merge

@maxpeterson maxpeterson force-pushed the email-already-verified-ui branch from a27352f to 33e7185 Compare November 30, 2016 15:35
Redirect to the login when attempting to verify an email address that is
already verified.
@maxpeterson maxpeterson force-pushed the email-already-verified-ui branch from 33e7185 to 14572c2 Compare November 30, 2016 15:36
@coveralls
Copy link

coveralls commented Nov 30, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 14572c2 on email-already-verified-ui into a0b36c9 on master.

self.activate_user()
if not self.already_verified:
self.activate_user()
messages.success(request, self.success_message)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should messages.success only be set if the user has not been verified?

Copy link
Member Author

Choose a reason for hiding this comment

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

success_message gets set to already_verified_message ('Your email is already confirmed.') if they are
already_verified

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see, I thought we were going down the path of calling messages.success twice.

@coveralls
Copy link

coveralls commented Nov 30, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 14572c2 on email-already-verified-ui into a0b36c9 on master.

@maxpeterson
Copy link
Member Author

@kevinetienne happy to merge?

@coveralls
Copy link

coveralls commented Nov 30, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 14572c2 on email-already-verified-ui into a0b36c9 on master.

@kevinetienne kevinetienne merged commit 4b9c2ac into master Nov 30, 2016
@kevinetienne kevinetienne deleted the email-already-verified-ui branch November 30, 2016 16:20
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

Successfully merging this pull request may close these issues.

3 participants