-
Notifications
You must be signed in to change notification settings - Fork 25
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
802 unique ids for anon users #1293
Conversation
Thanks for the testing!! I will take a look at these issues!
You should always use the normal sidewalk database, except for the one situation where you are classifying labels from the mturk study 😁 |
…Webpage into 802-unique-ids-for-anon-users
This seems to be working correctly for me, so I just want to check two things. If they were anon user accounts where you then signed up with them, they would now be considered registered users. Also they needed to have started an audit task (so they would have needed to complete the tutorial and start the first task). Do the two anon user accounts you were talking about fall into either of these categories?
Okay I'm also not getting that anymore, I'll look into it.
Yep, thank you! I found the problems and am working on them now 👍
That's fine, as long as it seems to be working correctly, that should be good. I didn't make significant changes to the clustering, except to delete the old anon user code 👍 |
Aaah I see - in that case, it's working perfectly for me! The accounts that I had made earlier only visited the results/faq page (and didn't create accounts later on). |
@aileenzeng prompting anon users to sign up should be fixed, and the charts on the admin page should be fixed as well. The anon user parts of those charts may look wrong because there are only a couple users. The only way to really test it is to make a few more anon user accounts (where they never sign up) with varying number of labels placed and missions completed. Then the charts should look normal. |
Hmm I'm not having these issues... Can you just double check a few things:
|
Yes for the first three -- I'll try the fourth one! |
Got it working -- everything looks great! One small issue: when I make an account through the audit screen, the window doesn't close. (A similar issue is logged in #1294) |
Yayyyy thank you! And so glad that it is all working now!! 😁
Yep, that's the same issue. I updated the title for that issue to reflect that it covers both signing in and signing up 😁 |
…Webpage into 802-unique-ids-for-anon-users
Merging into develop now!! |
Resolves #802
Partially resolves #783
Summary
Each anonymous user is now automatically assigned a unique that is treated exactly the same as registered users. They are essentially given a randomized username, email, and password that is overwritten if they ever decide to sign up. The user experience should not change at all for anonymous users, except that their contribution is saved until they are logged out by closing their browser, etc., and when an anonymous user signs up, their contribution is converted to the account they just created. But the rest of the experience is the same, in that the navbar still has the same look as it used to have for anonymous users, etc.
This update is incompatible with the dataset we collected for DC. Anonymous users were just implied by IP address when collecting the DC data, and I removed all the code that handles anonymous users in that way, and all the code that searches through the database for ip addresses to count ip-address-based contributions, cluster their labels, etc. So if you run the current code on the DC data, it will look like there have been no anonymous users at all. The implementation I've done here is meant to have anonymous user contributions recorded in a more robust way when collecting data in future cities.
Testing
role
table has been updated to be called "Registered", and that a new entry with the role "Anonymous" has been added to the table.user
table and that they have the new "Anonymous" role. You can do this by logging in as an admin (in your non private/incognito window), and check the User tab of the admin page. If you sort by registration date, you should see a user that has just registered who has the Anonymous role. The user should have a randomly generated username and email address.webpage_activity
table, you should also see a new entry with the activity "AnonAutoSignUp"webpage_activity
table, "SignUp" and then "SignIn" should be logged for that user.user
table, theuser_id
remains the same, but theusername
andemail
is updated to what you used to sign up (i.e., the old anon user entry is modified, instead of a new user being created).user_role
table is updated from the "Anonymous" role to the "Registered" role.localhost:9000/faq
, and you should be able to check that a new anonymous user has been created. Try the same thing by going directly to /audit, /results, etc. Anything you can find to test it out. I tried to do the auto sign up for any URL that goes to an actual webpage (i.e., I excluded the straight up API endpoints that just return some JSON).user_clustering_session
table used to have anis_anonymous
column, and two optional columns:ip_address
anduser_id
. Check that nowis_anonymous
andip_address
are no longer columns in the table, whileuser_id
should be a required field now (i.e., not nullable).user_clustering_session
table as last time. This is because we are no longer looking at users who audited anonymously in the old way (where we only identify them by ip address). So this is only looking at registered users, and the new anon user accounts you created while testing.Other small changes and how to test them
selectAuditTaskInteractionsOfAUser
takes aregion_id
and auser_id
as parameters. This testing is mostly just to make sure that I didn't accidentally delete a comma or something that would cause the query not to run.