Closed Bug 399654 Opened 17 years ago Closed 17 years ago

Entering a bug with strict_isolation turned on fails due to an incorrect argument passed to can_see_product()

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

3.1.2
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: mkanat, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

I have this situation:

  bob is in the group "everythingsolved"
  everything solved is a member of the "nasa" group
  The "NASA" product is Mandatory/Mandatory/ENTRY for the "nasa" group.

  There is no "canedit" set anywhere. (Also note that "everythingsolved" is a member of "editbugs", so bob has editbugs.)

  When I enter a bug and try to make bob the assignee or QA contact, I get an error saying that bob can't edit the product and so can't be the assignee of the bug.
Oh, and of course, I have strict_isolation turned on.
Flags: blocking3.1.3+
2 questions:
- Is 3.0.x also affected?
- Is it working correctly with strict_isolation turned off?
(In reply to comment #2)
> - Is 3.0.x also affected?

  I haven't tested, but I don't think so. I just started seeing this behavior recently, so I suspect it has something to do with bug 349567.

> - Is it working correctly with strict_isolation turned off?

  Yes.
I cannot reproduce the bug on tip. Could you try again? This bug should not be triggered as can_edit_product() requires CANEDIT = 1 and you say it's 0. If the culprit is because can_see_product() returns false, then this behavior is expected. If you can still reproduce the bug, you could add some warn() in _check_strict_isolation() and see which check returns false.
OK, I'm unable to file a bug in a product with no restriction, so there is definitely something wrong here. Taking and investigating!
Assignee: create-and-change → LpSolit
(In reply to comment #3)
> recently, so I suspect it has something to do with bug 349567.

Yes, you are right, this is the culprit. can_see_product() requires a product name, not a product ID. Patch coming.
Status: NEW → ASSIGNED
Depends on: 349567
Attached patch patch, v1Splinter Review
->id must be ->name.
Attachment #295086 - Flags: review?(wurblzap)
Attachment #295086 - Flags: review?(mkanat)
Comment on attachment 295086 [details] [diff] [review]
patch, v1

Thankfully this was simple. Seems to be the only place this can_see_product was called incorrectly.
Attachment #295086 - Flags: review?(wurblzap)
Attachment #295086 - Flags: review?(mkanat)
Attachment #295086 - Flags: review+
Flags: approval+
Summary: Entering a bug with strict_isolation doesn't consider group inheritance → Entering a bug with strict_isolation turned on fails due to an incorrect argument passed to can_see_product()
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v  <--  Bug.pm
new revision: 1.222; previous revision: 1.221
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: