Skip to content

Return emailChecksum for invitations #420

@maxceem

Description

@maxceem

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 to email. See the list of such endpoints in this challenge description https://www.topcoder.com/challenges/30108867 (ignore GET /v4/projects/db endpoint).
  • emailChecksum should be always returned, no matter if email 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 field emailChecksum if email field is a string. If email field is not a string, then emailChecksum should be set the same as email. For more details on how to use jsonPath 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions