If I create a new user, and sign into webmaker, then fill in my desired username, click "I agree to ToS", but NOT "you can email me", and I then check what the values are for this used in the login admin console, the "egagements" checkbox is checked, indicating I did in fact pick that option when I didn't.
The user model sets those fields to "true" by default, so if the boxes are unchecked they must explicitly pass "false" for both fields.
if the boxes are unchecked, the browser will not even send them as part of the query. Only when true will they show up as query arguments, so those defaults should actually be "false".
I agree! The question becomes, which change is more reasonable atm? I suspect it will be easier to update client-side user creation logic to pass "false" than it will be to change the user schema and deal with the fallout of that.
doesn't a default value for a column take effect on new records only? It shouldn't try to rewrite all the existing data, so updating the schema to say "the default is now 'false'" should be pretty safe.
The default should be false on the user column, I can deal with the existing data easily enough (in another bug)
Created attachment 765402 [details] [review] https://github.com/mozilla/login.webmaker.org/pull/116 While running locally it didn't affect existing documents in the database, and new users had the new defaults.
Comment on attachment 765402 [details] [review] https://github.com/mozilla/login.webmaker.org/pull/116 r-, you have failing tests to fix up: https://travis-ci.org/mozilla/login.webmaker.org/jobs/8279874#L1009
Comment on attachment 765402 [details] [review] https://github.com/mozilla/login.webmaker.org/pull/116 Argh.. that was just lazy testing on my part. Sorry for wasting your time! Haha 2 for the money!
Comment on attachment 765402 [details] [review] https://github.com/mozilla/login.webmaker.org/pull/116 Three to get ready!
Commits pushed to master at https://github.com/mozilla/login.webmaker.org https://github.com/mozilla/login.webmaker.org/commit/a4845d6967601b4ebc735bbab2dea072998850f4 [Bug 885000] Changed user defaults for notifications/engagements https://github.com/mozilla/login.webmaker.org/commit/ac1c0d59a0611b29cd9a531145eece2f96bb055a Merge pull request #116 from ksedge/bug885000 [Bug 885000] Changed user defaults for notifications/engagements
FOUR TO LIKE, GO OR SOMETHING!