diff options
author | Robert Webb <rowebb@gmail.com> | 2011-09-01 22:24:27 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-09-01 22:24:27 +0200 |
commit | 7a9a4fdc72fa194e1921ee157ae7f79507540f1c (patch) | |
tree | fa37bf8cc697f8c9c9e0169885a5fa8389f9e713 /Bugzilla/BugUrl | |
parent | 4055a481342339a5665df5b2ddb2f6843c66c368 (diff) | |
download | bugzilla-7a9a4fdc72fa194e1921ee157ae7f79507540f1c.tar.gz bugzilla-7a9a4fdc72fa194e1921ee157ae7f79507540f1c.tar.xz |
Bug 683025 - Add a check_for_edit to Bugzilla::Bug to return the bug object
if the user can edit the bug
r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/BugUrl')
-rw-r--r-- | Bugzilla/BugUrl/Bugzilla/Local.pm | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Bugzilla/BugUrl/Bugzilla/Local.pm b/Bugzilla/BugUrl/Bugzilla/Local.pm index 233acbe66..c052d7d3b 100644 --- a/Bugzilla/BugUrl/Bugzilla/Local.pm +++ b/Bugzilla/BugUrl/Bugzilla/Local.pm @@ -119,7 +119,7 @@ sub _check_value { } my $ref_bug_id = $uri->query_param('id'); - my $ref_bug = Bugzilla::Bug->check($ref_bug_id); + my $ref_bug = Bugzilla::Bug->check_for_edit($ref_bug_id); my $self_bug_id = $params->{bug_id}; $params->{ref_bug} = $ref_bug; @@ -127,12 +127,6 @@ sub _check_value { ThrowUserError('see_also_self_reference'); } - my $product = $ref_bug->product_obj; - if (!Bugzilla->user->can_edit_product($product->id)) { - ThrowUserError("product_edit_denied", - { product => $product->name }); - } - return $uri; } |