Repository navigation
Bug 2078325 - #2834
Merged
Merged
Bug 2078325#2834
Conversation
There was a problem hiding this comment.
🟡 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); |
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.

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