Skip to content
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

Closed
wants to merge 16 commits into from

Conversation

agustibr
Copy link

@agustibr agustibr commented May 9, 2018

🎩 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

  • Add CHANGELOG entry
  • Add/modify seeds
  • Add tests
  • Add field tos_accepted_at to user
  • Added form to accept new TOS
  • Added option to refuse terms
  • signed_in user must accept to continue
  • fixed bug with high_voltage gem version
  • invited users should also accept TOS

📷 Screenshots (optional)

  • Redirected to tos page:
    screenshot from 2018-05-09 17-55-22

  • If TOS are accepted:
    screenshot from 2018-05-09 17-55-59

  • If the Refuse option is clicked a modal is shown with options:
    screenshot from 2018-05-16 16-49-05

  • Accept Invitation screen with TOS checkbox and text:
    screenshot from 2018-05-16 16-45-32

@agustibr agustibr force-pushed the feature/user_needs_tos_accepted branch 4 times, most recently from edee5b6 to 22e9068 Compare May 17, 2018 12:01
@agustibr agustibr force-pushed the feature/user_needs_tos_accepted branch from 9bf427d to 5513119 Compare May 22, 2018 09:49
Copy link

@tramuntanal tramuntanal left a 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

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.

Copy link
Author

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

Copy link
Author

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

@agustibr agustibr force-pushed the feature/user_needs_tos_accepted branch 3 times, most recently from 4f330bc to 5020a37 Compare May 23, 2018 15:41
@agustibr agustibr force-pushed the feature/user_needs_tos_accepted branch from 5020a37 to 2e0917b Compare May 24, 2018 12:43
@agustibr agustibr closed this May 24, 2018
tramuntanal pushed a commit that referenced this pull request Jan 20, 2021
* 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>
laurajaime added a commit that referenced this pull request Mar 8, 2021
Backport "Fix duplicated error in datetime_fields" to release/0.22-stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants