Biocaching / app

Repository for both web- and mobile app
1 stars 3 forks source link

Accept modified terms #23

Open pbb72 opened 7 years ago

pbb72 commented 7 years ago

Currently, users only need to accept terms once.

But when terms are updated, the user should accept them again.

This should be done in two locations:

If declining the terms, the user should be logged out.

bjornhjelle commented 7 years ago

The terms are as of now hardcoded in a controller in the backend. When we change the terms we also change the 'date_of_update'. Whenever the user logs in the API checks if the terms has been accepted after last 'date_of_update'. The API has a method to check if the user has accepted already.

Abbe98 commented 7 years ago

@bjornhjelle what's the best way to reset the fact that an user has accepted the terms? I remember this was broken over at biocaching.com and could need to do that for debugging purposes...

bjornhjelle commented 7 years ago

Logg into server as yourself, and: $ sudo su - bc $ cd speciesdb $ rails db Password: ***** MariaDB [speciesdb_production]> select id from users where email = 'albin@biocaching.com'; MariaDB [speciesdb_production]> update users set accepted_terms_at = curdate() - interval 1 year where id = ();

Abbe98 commented 7 years ago

Great thanks!

2017-03-04 22:14 GMT+01:00 Bjørn Hjelle notifications@github.com:

Logg into server as yourself, and: $ sudo su - bc $ cd speciesdb $ rails db Password: ***** MariaDB [speciesdb_production]> select id from users where email = ' albin@biocaching.com'; MariaDB [speciesdb_production]> update users set accepted_terms_at = curdate() - interval 1 year where id = ();

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Biocaching/app/issues/23#issuecomment-284181389, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgoJ-nvLLQEUWlAMe8Ppr4EwGiixn8eks5ridRAgaJpZM4L_vd9 .