Closed Bug 337026 Opened 20 years ago Closed 20 years ago

Users with no privs cannot edit bugs anymore (if being logged out first)

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.23
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

A powerless user (= without editbugs privs) who has no role related to some given bug and who is logged out cannot edit the bug anymore (after entering his username and password), because show_bug.cgi displays the resolution field by default and CheckCanChangeField() no longer ignores the resolution since bug 92515 is fixed. The problem is that process_bug.cgi passes *all* fields to CheckCanChangeField() for validation, even those which will be ignored later (such as the resolution when the user doesn't try to change it). We should let ChangeResolution() do this check itself.
Attached patch patch, v1 — — Splinter Review
Attachment #221229 - Flags: review?(justdave)
Attachment #221229 - Flags: review?(justdave) → review+
Comment on attachment 221229 [details] [diff] [review] patch, v1 as I mentioned earlier on IRC I think it'd be good to get it to be able to figure out what you were changing from and to that you weren't allowed to during a change multiple, and the "user has privs if they get here" comment isn't accurate. The first can be dealt with later, this fixes the regression at least. You should fix the comment on checkin though.
Oh, something else I just thought of.... We need to be careful that we're not throwing errors in the middle of a change-multiple. If anything in a change-multiple is going to cause an error we need to throw the error ahead of time before we change anything in the list. I'm not quite clear from the flow here if that's the case here or not, but it looks like we're still safe from my guess. Someone who's looked at the code more than me recently should double-check though.
Flags: approval+
Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.317; previous revision: 1.316 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 337073
Does this take product-specific editbugs privs by group access controls into account?
(In reply to comment #5) > Does this take product-specific editbugs privs by group access controls into > account? > Yup, the first thing process_bug.cgi does is to call Bugzilla::Bug::ValidateBugID(), which makes sure you can access the bug. And later in the code, it makes sure you can edit bugs in the given product (the CANEDIT bit you can find when viewing product-group settings). CheckCanChangeField() doesn't care about group access controls. Its job is to make sure you have enough privs to edit some given fields the bug (i.e. either you have editbugs privs or you are the reporter/assignee/QA contact).
Flags: testcase?
Flags: testcase?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: