Closed
Bug 1256051
Opened 8 years ago
Closed 8 years ago
Allow MozReview.attachments() to post mozreview-* tags without requiring editbugs
Categories
(bugzilla.mozilla.org Graveyard :: Extensions: MozReview Integration, defect)
bugzilla.mozilla.org Graveyard
Extensions: MozReview Integration
Production
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mcote, Assigned: dylan)
References
Details
Attachments
(1 file, 1 obsolete file)
1.65 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Since editbugs is not required for MozReview usage (which only creates & updates attachments & flags and posts comments), in order to tag comments from MozReview (bug 1226080) the custom MozReview.attachments() API should bypass that permission check but *only* for tags beginning with "mozreview-". It will still be up to the caller to specify the exact tag.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → dylan
Assignee | ||
Updated•8 years ago
|
Component: Review Board: Extension → Extensions: MozReview Integration
Product: MozReview → bugzilla.mozilla.org
Assignee | ||
Comment 1•8 years ago
|
||
Alright, this should allow mozreview api keys to set comment tags using the MozReview.attachments() API. The logic is: "if all tags match /^mozreview-?/ or the user can_tag_comments, let them set comments". To test this I recommend setting the mozreview_app_id to deadbeefcafe and creating a new API key, and setting that API key's app_id to deadbeefcafe. Some notes here: At some point we really need to consider some internal API for mocking group membership. We do this in several places in the code. Doing this by hand is fraught with difficulty, as methods like "can_tag_comments" cache the result of $user->in_group(), so overloading the list of groups *isn't* enough sometimes. For this patch, I'm using the "local" directive to temporarily set the $user->{can_tag_comment} to a true value. Unrelated to this, every time I see the scalar grep in $user->in_group() I sigh a little bit, so I've declared war on scalar/boolean grep upstream.
Attachment #8744547 -
Flags: review?(dkl)
Assignee | ||
Comment 2•8 years ago
|
||
without my debugging module
Attachment #8744547 -
Attachment is obsolete: true
Attachment #8744547 -
Flags: review?(dkl)
Attachment #8746105 -
Flags: review?(dkl)
Comment 3•8 years ago
|
||
Comment on attachment 8746105 [details] [diff] [review] 1256051_2.patch Review of attachment 8746105 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8746105 -
Flags: review?(dkl) → review+
Assignee | ||
Comment 4•8 years ago
|
||
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git 6b76c8f..977dfb5 master -> master
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: bugzilla.mozilla.org → bugzilla.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•