-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Overview
Recently, we started masking emails inside invitation objects when returning invitations to non-admin users see PR #418 and related challenge https://www.topcoder.com/challenges/30108867 for the reference.
Now for a few situations in the client-side we have to identify the invitation by masked email, but we cannot: appirio-tech/connect-app#3412 and appirio-tech/connect-app#3392.
To accomplish the mentioned issues client-side we have to return md5 hash of email from the server, so on the client-side when we cannot see the actual email, because it's masked, we can still identify which invitation it was.
Task
- All the endpoints that return invitations should return additional field
emailChecksum
in each invitation object additionally toemail
. See the list of such endpoints in this challenge description https://www.topcoder.com/challenges/30108867 (ignoreGET /v4/projects/db
endpoint). emailChecksum
should be always returned, no matter ifemail
field is masked or non-masked.
Implementation requirements
Technically, we should implement it a similar way as we did for masking emails:
- create a reusable method
util.populateEmailChecksum(jsonPath, data)
- this method should find objects using
jsonPath
and populate them with additional fieldemailChecksum
ifemail
field is a string. Ifemail
field is not a string, thenemailChecksum
should be set the same asemail
. For more details on how to usejsonPath
see previous challenge spec https://www.topcoder.com/challenges/30108867 - after implementing such a method, apply it to all endpoints where we need it, and use the correct
jsonPath
adjusted for a certain endpoint.
Verification
Provide a demo video in which show how you call ALL the required endpoints one by one and all of them return invites with emailChecksum
populated.