CHI-3736: Mask identifiers in browser notifications#3964
CHI-3736: Mask identifiers in browser notifications#3964stephenhand wants to merge 14 commits intomasterfrom
Conversation
… include the users identifier when masking IDs
| return { translateUI, getMessage }; | ||
| }; | ||
|
|
||
| export const lookupTranslation = (code: string, parameters: Record<string, string> = {}): string => { |
There was a problem hiding this comment.
@copilot Add unit tests for this new method in the existing unit test file for this module
| maskNotifications(channelType); | ||
| }; | ||
|
|
||
| export const maskNotifications = (channelType: TaskChannelDefinition) => { |
There was a problem hiding this comment.
@copilot Update the unit tests for this file to cover the logic for masking notifications
|
@stephenhand I've opened a new pull request, #3965, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
…escribe block Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Add unit tests for lookupTranslation and maskChannelStringsWithIdentifiers notification logic
There was a problem hiding this comment.
Pull request overview
Updates browser notification titles for masked-identifier scenarios so chat message notifications no longer expose user identifiers, using a new localized string and a translation lookup helper.
Changes:
- Added
lookupTranslationhelper to compile Flex Manager string templates with optional parameters. - Overrode the
NewChatMessagebrowser notification title to a masked, localized title whenVIEW_IDENTIFIERSis denied. - Added unit tests for
lookupTranslationand for the new notification override behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| plugin-hrm-form/src/translations/index.ts | Adds lookupTranslation for resolving/compiling translations from Flex Manager strings. |
| plugin-hrm-form/src/translations/en.json | Adds a new key for the masked browser notification title (“New message”). |
| plugin-hrm-form/src/maskIdentifiers/index.ts | Hooks a NewChatMessage browser notification override into the identifier-masking setup. |
| plugin-hrm-form/src/_tests/translations/index.test.ts | Adds test coverage for lookupTranslation. |
| plugin-hrm-form/src/_tests/maskIdentifiers/index.test.ts | Adds test coverage for the notification override when identifiers are masked. |
|
@stephenhand I've opened a new pull request, #3967, to work on those changes. Once the pull request is ready, I'll request review from you. |
…ing on global Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Fix: Explicitly import Handlebars in translations/index.ts instead of relying on global
|
@stephenhand I've opened a new pull request, #3975, to work on those changes. Once the pull request is ready, I'll request review from you. |
…deletion Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
CHI-3736: Mask identifiers in browser notifications
Description
Replace standard new message notification title with one that doesn't include the users identifier when masking IDs
Checklist
Other Related Issues
None
Verification steps
See ticket
AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P