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

Fix services user id registration / removal #108

Merged
merged 3 commits into from
Sep 25, 2016

Conversation

dinoboff
Copy link
Contributor

@dinoboff dinoboff commented Sep 17, 2016

TODO:

@dinoboff
Copy link
Contributor Author

dinoboff commented Sep 18, 2016

@SingaporeClouds The PR includes some rule changes that will prevent old client to add a services.

The rules enforce a service user id is only used by one user. To add a service:

  • you must claim it with /classMentors/servicesUserIds/$serviceId/$serviceUserId set to $publicId
  • add service details (id, name and registeredBefore timestamp) at classMentors/userProfiles/$publicId/services/$serviceId with details.id set to $serviceUserId.

We should probably go through each profile and remove service when the user id is shared and add the user id claims otherwise.

* id and name are currently the same value but AFAIK code combat profile have a user name, shown in the code combat profile page and a user id, used to query achievements; We could ask the user a code combat user name and convert it to a user id.

@dinoboff dinoboff changed the title [WIP] Fix services user id registration / removal Fix services user id registration / removal Sep 18, 2016
@dinoboff dinoboff changed the title Fix services user id registration / removal [WIP] Fix services user id registration / removal Sep 18, 2016
@SingaporeClouds
Copy link
Member

There is no reason to prevent users from claiming the same username on a 3rd party service at this point in time. Everyone's username for each service is shown on their profile page, so anyone could quickly determine if someone was using a username that wasn't theirs. Also, if someone accidentally claims someone else's username on Code Combat or FreeCodeCamp by accident (or intentionally), the actual username owner would then be unable to claim their username. The downside of handling these potential disputes at scale is currently greater than the benefit of preventing multiple users from using the same 3rd party username. Therefore, please leave out any rules or mechanisms that try to prevent multiple users from trying to claim the same 3rd party service username.

@dinoboff dinoboff force-pushed the profile-update branch 2 times, most recently from 9e5b196 to 1d4cac4 Compare September 22, 2016 15:36
@dinoboff dinoboff force-pushed the profile-update branch 2 times, most recently from 3b87a61 to 0a31d68 Compare September 24, 2016 12:42
@coveralls
Copy link

Coverage Status

Coverage increased (+2.6%) to 10.267% when pulling 0a31d68 on dinoboff:profile-update into b5bab42 on singpath:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+5.3%) to 12.991% when pulling ca1eaa1 on dinoboff:profile-update into b5bab42 on singpath:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+5.3%) to 12.991% when pulling 582f0f0 on dinoboff:profile-update into b5bab42 on singpath:master.

- removed dead code from profile component;
- refactor service cards into a component
- move service registration logic out of the profile controller;
- automatically create service update task when adding a service.
@coveralls
Copy link

Coverage Status

Coverage increased (+5.9%) to 13.583% when pulling 6f766b8 on dinoboff:profile-update into b5bab42 on singpath:master.

@dinoboff dinoboff merged commit 93cf53d into singpath:master Sep 25, 2016
@dinoboff dinoboff changed the title [WIP] Fix services user id registration / removal Fix services user id registration / removal Sep 25, 2016
@dinoboff dinoboff deleted the profile-update branch October 3, 2016 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants