-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
Resolves #4773: Reset password and invitation expiry #4796
base: main
Are you sure you want to change the base?
Resolves #4773: Reset password and invitation expiry #4796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you for your work on this so far -- I've got a couple of comments from a functional point of view. Could you address those, please?
@@ -21,7 +21,7 @@ en: | |||
hello: "Hello %{email}" | |||
someone_invited_you: "Someone has invited you to %{url}, you can accept it through the link below." | |||
accept: "Accept invitation" | |||
accept_until: "This invitation will be due in %{due_date}." | |||
accept_until: "This invitation will be due in %{due_date} GMT." | |||
ignore: "If you don't want to accept the invitation, please ignore this email.<br />\nYour account won't be created until you access the link above and set your password." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the conversation in the issue, this should be "This invitation will expire at [Date and Time] GMT or if a new password reset is triggered. "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, let me know if the message is correct now 🙏
@@ -373,9 +373,6 @@ | |||
<% if @resource.invitation_due_at %> | |||
<p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %></p> | |||
<% end %> | |||
<p>For security reasons these invitations expire. This invitation will expire in 8 hours or if a new password reset is triggered.</p> | |||
<p>If your invitation has an expired message, go <%= link_to "here", new_user_password_url %> and enter your email address to reset your password.</p> | |||
<p>Feel free to ignore this email if you are not interested or if you feel it was sent by mistake.</p> | |||
</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to show the text about what to do if your invitation has expired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure 🙌
I made the changes needed, let me know if you want me to squash my commits into one or if anything else is missing 🙌 |
Resolves #4773
Description
Please let me know if it is better to squash the commits into 1 or two commits.
Also, let me know if would be good to add a test with time helpers to test that in fact the invitation/password reset instruction does expire within the time frame. I didn't add them because I thought it is an expensive test to run everytime and also I thought this is something we may not change again so Idk if its worth to include it, but please let me know if it is.
Type of change
How Has This Been Tested?
User invite
Logged in as:
Go to My organization -> Users -> "Invite user to this organization"
Password reset
Sent password reset instructions in the Log In screen with org admin email: org_admin1@example.com
Screenshots
User invitation:
User password reset: