Skip to content

PM-4010 - #162

Merged
jmgasper merged 2 commits into
masterfrom
develop
Oct 14, 2026
Merged

jmgasper merged 2 commits into
masterfrom
develop

Conversation

@jmgasper

Copy link
Copy Markdown
Contributor

jmgasper and others added 2 commits October 9, 2026 11:40
What was broken
Users who have the Talent Manager role and also the copilot role could not
see a member's email on the member profile, even though Talent Managers are
allowed to see it. Phone numbers were still shown. The bug only showed up
for some of these users, depending on which members they had worked with.

Root cause
copilotEmailAccess.shouldLimitCopilotEmailAccess limits email access for any
caller with the copilot role unless they are an admin. Talent Manager was not
exempt, so a TM who is also a copilot was treated like a plain copilot. They
could only see the email of members who share a challenge resource with
them. getMember then removed the email that omitMemberAttributes had already
allowed for the Talent Manager role. The same rule applied to member search.

What was changed
- shouldLimitCopilotEmailAccess now skips the copilot restriction for any
  sensitive data role (helper.hasSensitiveDataRole, which covers admin,
  administrator and Talent Manager) instead of only admin roles. This
  matches the role check omitMemberAttributes already uses for email and
  phones.
- Added JSDoc for shouldLimitCopilotEmailAccess.
- Copilots without the admin or Talent Manager role still only see emails of
  members they share a challenge with.

Added/updated tests
- New test/unit/CopilotEmailAccess.test.js:
  - a plain copilot is still limited;
  - a Talent Manager + copilot (the role set from the ticket) is not
    limited and keeps member emails in getMember and search filtering;
  - an administrator + copilot is not limited.
  The Talent Manager case fails without this fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PM-4010: Let Talent Manager copilots see member emails
@jmgasper
jmgasper merged commit 1eb4586 into master Oct 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant