Honor *_accessible in User->can_edit_bug
parent
b18dc7c84d
commit
10c4d41651
|
@ -647,18 +647,12 @@ sub can_edit_bug
|
||||||
$bug = Bugzilla::Bug->$new($bug);
|
$bug = Bugzilla::Bug->$new($bug);
|
||||||
return undef if !$bug;
|
return undef if !$bug;
|
||||||
}
|
}
|
||||||
return 1 if
|
return 1 if $bug->assigned_to_id && $bug->assigned_to_id == $self->id ||
|
||||||
$bug->assigned_to && $bug->assigned_to->id == $self->id ||
|
Bugzilla->params->{useqacontact} && $bug->qa_contact_id && $bug->qa_contact_id == $self->id ||
|
||||||
Bugzilla->params->{useqacontact} && $bug->qa_contact && $bug->qa_contact->id == $self->id ||
|
$bug->reporter_accessible && $bug->reporter_id && $bug->reporter_id == $self->id ||
|
||||||
$bug->reporter && $bug->reporter->id == $self->id;
|
$bug->cclist_accessible && grep($_->id == $self->id, @{$bug->cc_users}) ||
|
||||||
# FIXME check cc logic
|
$self->can_edit_product($bug->product_id);
|
||||||
my $cc = $bug->cc_users;
|
ThrowUserError('product_edit_denied', { product => $bug->product }) if $throw_error;
|
||||||
foreach (@$cc)
|
|
||||||
{
|
|
||||||
return 1 if $_->id eq $self->id;
|
|
||||||
}
|
|
||||||
return 1 if $self->can_edit_product($bug->product_obj->id);
|
|
||||||
ThrowUserError("product_edit_denied", { product => $bug->product }) if $throw_error;
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue