Open pbb72 opened 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.
@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...
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 = (
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 .
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.