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
User must review TOS when updated #4
Conversation
edee5b6
to
22e9068
Compare
9bf427d
to
5513119
Compare
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.
Great work, just one doubt!
@@ -59,6 +59,7 @@ def create_or_find_user | |||
@user.skip_confirmation! if verified_email | |||
end | |||
|
|||
@user.tos_accepted_at = @user.organization.tos_updated_at |
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.
If I understand well, @user.tos_accepted_at
is not the timestamp when the user accepted the tos but the version of the accepted tos. If this is the case, we should use another name like @user.tos_version
or @user.accepted_tos_version
.
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.
Yes you're right, @user.tos_accepted_at
is the timestamp of the accepted version of the tos.
Maybe @user.accepted_tos_updated_at
is more appropriate, as in another PR the organization will have the tos_updated_at
attribute:
add_column :decidim_organizations, :tos_updated_at, :datetime
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've changed it to accepted_tos_version
for User
and to tos_version
for Organization
4f330bc
to
5020a37
Compare
5020a37
to
2e0917b
Compare
* revert keys type in smtp_settings from symbol to strings * switch smtp_settings keys from symbols to strings * Fix smtp settings specs (#2) * light cleanup application mailer specs * add tests in register organization specs * Revert "Fix smtp settings specs (#2)" (#3) This reverts commit 9838bec. * Update organization seeds (#1) * Update organization seeds * Fix migration * Clean tests * Complete migration by adding down * Fix smtp settings specs (#4) * light cleanup application mailer specs * add tests in register organization specs * Remove migration and update CHANGELOG * Remove CHANGELOG entry Co-authored-by: Quentin Champ <26109239+Quentinchampenois@users.noreply.github.com> Co-authored-by: Armand Fardeau <armandfardeau@users.noreply.github.com>
Backport "Fix duplicated error in datetime_fields" to release/0.22-stable
🎩 What? Why?
When a user has accepted the TOS (Term Of Service), if it gets updated the user must review and accept again. Or an option to refuse.
📌 Related Issues
📋 Subtasks
CHANGELOG
entrytos_accepted_at
to userhigh_voltage
gem version📷 Screenshots (optional)
Redirected to tos page:
If TOS are accepted:
If the Refuse option is clicked a modal is shown with options:
Accept Invitation screen with TOS checkbox and text: