Closed Bug 1149055 Opened 10 years ago Closed 10 years ago

flag requestees are unable to set an attachment flag via a the update_attachment webservice if they do not have editbugs

Categories

(Bugzilla :: WebService, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(1 file)

if you set the requestee of a flag to a user without editbugs, they are able to set the flag via the bugzilla web user interface. however when calling the update_attachment webservice method, the user requires the ability to edit the attachment and the update fails with: > You are not authorized to edit attachment 2 [details] [diff] [review] this is because the B::W::Bug::update_attachment always calls: > $attachment->validate_can_edit > || ThrowUserError("illegal_attachment_edit", { attach_id => $id }); it pains me to see this sort of logic outside of Bugzilla::Attachment, but that's a story for another day. attachment.cgi has special logic for this scenario, with the following comment: > # Requestees can set flags targetted to them, even if they cannot > # edit the attachment. Flag setters can edit their own flags too. this needs to be mirrored by the webservice.
Assignee: webservice → glob
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 5.0
Version: unspecified → 5.0
Attached patch 1149055_1.patchSplinter Review
Attachment #8585510 - Flags: review?(dkl)
Comment on attachment 8585510 [details] [diff] [review] 1149055_1.patch Review of attachment 8585510 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8585510 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval5.0?
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 33a4bd4..e4362da master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git fff3c76..ae30ea2 5.0 -> 5.0
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: approval?
Flags: approval5.0?
Flags: approval5.0+
Flags: approval+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: