Closed Bug 1143536 Opened 10 years ago Closed 10 years ago

product dashboard doesn't honour product visibility

Categories

(bugzilla.mozilla.org Graveyard :: Extensions: ProductDashboard, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glob, Assigned: dkl)

Details

Attachments

(1 file)

product dashboard doesn't honour product visibility. eg. the 'finance' product isn't in the product select, however you can always visit https://bugzilla.mozilla.org/page.cgi?id=productdashboard.html&tab=&product=Finance&bug_status=open to see the bug data (even if you aren't logged in).
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attached patch 1143536_1.patchSplinter Review
Changed to can_see_product instead of can_enter_product and now die instead of allowing the code to continue if the user cannot see the product. Product needs to be MANDATORY/MANDATORY to not be visible in the product dashboard. Please commit this before the next push if r+ dkl
Attachment #8578223 - Flags: review?(glob)
Comment on attachment 8578223 [details] [diff] [review] 1143536_1.patch Review of attachment 8578223 [details] [diff] [review]: ----------------------------------------------------------------- r=glob. i'll fix the issues on commit. ::: extensions/ProductDashboard/Extension.pm @@ +80,3 @@ > # We need to check and make sure that the user has permission > + # to see this product. > + my $product = new Bugzilla::Product({'name' => $product_name}); while we're touching it, we should be using the cache here. @@ +80,5 @@ > # We need to check and make sure that the user has permission > + # to see this product. > + my $product = new Bugzilla::Product({'name' => $product_name}); > + if (!$product || !$user->can_see_product($product->name)) { > + ThrowUserError('entry_access_denied', { product => $product_name }); throwing an error that you cannot create a bug in that product doesn't make sense here. let's just |return|
Attachment #8578223 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git 2d8badf..6598856 master -> master
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Group: mozilla-employee-confidential
Product: bugzilla.mozilla.org → bugzilla.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: