Skip to content

Commit

Permalink
fix: hide contactNumber (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonlimlianjie authored and alexanderleegs committed Mar 7, 2023
1 parent 99d2fd9 commit 8f64c71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/fixtures/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const mockCollaboratorContributor1: Attributes<User> & {
id: 1,
email: MOCK_IDENTITY_EMAIL_ONE,
githubId: "test1",
contactNumber: "12331231",
lastLoggedIn: new Date("2022-07-30T07:41:09.661Z"),
createdAt: new Date("2022-04-04T07:25:41.013Z"),
updatedAt: new Date("2022-07-30T07:41:09.662Z"),
Expand All @@ -59,7 +58,6 @@ export const mockCollaboratorAdmin1: Attributes<User> & {
id: 2,
email: MOCK_IDENTITY_EMAIL_TWO,
githubId: "test2",
contactNumber: "12331232",
lastLoggedIn: new Date("2022-07-30T07:41:09.661Z"),
createdAt: new Date("2022-04-04T07:25:41.013Z"),
updatedAt: new Date("2022-07-30T07:41:09.662Z"),
Expand All @@ -79,7 +77,6 @@ export const mockCollaboratorAdmin2: Attributes<User> & {
id: 3,
email: MOCK_IDENTITY_EMAIL_THREE,
githubId: "test3",
contactNumber: "12331233",
lastLoggedIn: new Date("2022-06-30T07:41:09.661Z"),
createdAt: new Date("2022-04-04T07:25:41.013Z"),
updatedAt: new Date("2022-07-30T07:41:09.662Z"),
Expand All @@ -99,7 +96,6 @@ export const mockCollaboratorContributor2: Attributes<User> & {
id: 4,
email: MOCK_IDENTITY_EMAIL_FOUR,
githubId: "test4",
contactNumber: "12331234",
lastLoggedIn: new Date("2022-07-30T07:41:09.661Z"),
createdAt: new Date("2022-04-04T07:25:41.013Z"),
updatedAt: new Date("2022-07-30T07:41:09.662Z"),
Expand Down
4 changes: 4 additions & 0 deletions src/services/identity/CollaboratorsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ class CollaboratorsService {
{
model: User,
as: "site_members",
attributes: {
// Hide PII such as contactNumber
exclude: ["contactNumber"],
},
},
{
model: Repo,
Expand Down

0 comments on commit 8f64c71

Please sign in to comment.