Repository navigation
Conversation
…evision is added to a security bug Bug 2065387 lets a component's triage owner see private bugs in that component while they are in mozilla-employee-confidential, but they could not see the bug's Phabricator revisions. When a revision is first attached to a private bug, add the triage owner to the CC list (if they are enabled and in mozilla-employee-confidential) so the existing subscriber sync gives them access to the revision. "First attached" is decided by whether the bug already has an attachment for the revision rather than by the "created" story, so revisions that get a bug id later, or are moved to another bug, are covered too, and a triage owner who removes themselves from the CC list is not added back.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change extending revision access to eligible confidential triage owners on private bugs.
No open issues 🎉
What changed in this PR
This PR extends PhabBugz’s existing CC-to-subscriber sync so eligible confidential triage owners gain access to revisions first attached to private bugs.
Changes:
- Adds the enabled, confidential triage owner to CC before revision subscribers are synchronized, without re-adding them on later updates to the same revision.
- Extracts a shared revision-attachment lookup used by attachment creation and assignee handling.
- Adds tests for subscription, CC removal persistence, and exclusion of non-confidential owners and public bugs.
| File | Description |
|---|---|
extensions/PhabBugz/t/bmo/feed-stories.t |
Tests triage-owner CC and subscription behavior and eligibility restrictions. |
extensions/PhabBugz/lib/Util.pm |
Adds the guarded triage-owner CC helper and shared attachment lookup. |
extensions/PhabBugz/lib/Feed.pm |
Calls the CC helper before subscriber synchronization when the revision has no existing attachment. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since 2065387, a component's triage owner can see private bugs in that component while they are a member of
mozilla-employee-confidential, but they still can't see the bug's Phabricator revisions, because revision subscribers only come from the bug's reporter, assignee, QA contact and CC list.This takes the simpler option from comment 0: when a revision is first attached to a private bug, the feed daemon adds the component's triage owner to the bug's CC list if they are enabled and in
mozilla-employee-confidential. The existing CC → subscriber sync then gives them access to the revision, and later CC changes keep flowing through the Push connector as before.Changes
extensions/PhabBugz/lib/Util.pm:get_revision_attachment($bug, $revision), the existing "attachment for D123" lookup pulled out ofcreate_revision_attachment.set_bug_assigneenow uses it too instead of its own copy.cc_triage_owner($bug), which adds the triage owner to the CC list when the bug has groups and the owner is enabled and inmozilla-employee-confidential. A failingadd_cc(e.g. strict isolation) is logged instead of failing the whole story.extensions/PhabBugz/lib/Feed.pm: in the private-bug branch ofprocess_revision_change, callcc_triage_ownerbefore the subscriber list is built, only when the bug has no attachment for the revision yet."First attached" is based on the attachment rather than the story's
$is_newflag, so it also covers revisions that get a bug ID after creation, revisions whose create story was skipped because the author couldn't see the bug yet, and revisions moved to another private bug. A triage owner who removes themselves from the CC list isn't added back on later updates.Not covered, as agreed in the bug: the CC isn't updated when a component's triage owner changes, a bug moves component, or someone joins or leaves
mozilla-employee-confidential.Test plan
test_bmo extensions/PhabBugz/t/bmo/passes (14 files, 681 tests). Thenot ok ... # TODOlines are existing known failures.extensions/PhabBugz/t/bmo/feed-stories.t:mozilla-employee-confidentialis not CC'dReferences