Skip to content

Bug 2078325 - #2834

Merged
dklawren merged 2 commits into
mozilla:masterfrom
dklawren:2078325
Nov 18, 2026
Merged

dklawren merged 2 commits into
mozilla:masterfrom
dklawren:2078325

Conversation

@dklawren

Copy link
Copy Markdown
Collaborator

Review+ carried over from private pull request
https://bugzilla.mozilla.org/show_bug.cgi?id=2078325

Copilot AI balanced review requested due to automatic review settings November 18, 2026 21:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Triagers without editbugs remain unable to change severity or priority on bugs where they are not the reporter, assignee, or QA contact because returning undef defers to permission checks that reject those updates.

1 open issue
What changed in this PR

This PR addresses Bug 2078325 by extending MozChangeField’s permission rules to bug creation, while preserving field values chosen by trusted server-side workflows.

Changes:

  • Resets restricted severity and priority values to defaults and removes unauthorized keywords during creation.
  • Shares severity and priority permission rules across creation and updates, including triager permissions.
  • Adds regression coverage and updates REST test expectations.
File Description
qa/​t/​rest_bug_get.t Updates severity expectations and moves keyword setup to an admin.
qa/​t/​rest_bug_create.t Tests creation-time severity and priority restrictions.
extensions/​MozProjectReview/​Extension.pm Marks server-generated child bugs as trusted creates.
extensions/​MozChangeField/​t/​bmo/​create-restricted-fields.t Adds field-permission and trusted-create regression tests.
extensions/​MozChangeField/​lib/​Pre/​TypePriSevEditbugs.pm Adds creation defaults and shared triager permission rules.
extensions/​MozChangeField/​lib/​Pre/​KeywordsCanconfirm.pm Restricts keyword creation and updates by permission.
extensions/​MozChangeField/​lib/​Post/​TypePriSevEditbugs.pm Reuses shared permissions for update validation.
extensions/​MozChangeField/​Extension.pm Runs creation sanitizers and supplies permission context.
extensions/​BMO/​Extension.pm Marks server-generated incident and child bugs as trusted creates.

Review effort: Balanced

reason => 'You need "editbugs" permissions to change this field.',
};
}
return undef if $self->can_set_field($field, $args);
@dklawren
dklawren merged commit 1a1362a into mozilla:master Nov 18, 2026
7 checks passed
@dklawren
dklawren deleted the 2078325 branch November 18, 2026 22:07
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.

2 participants