diff options
author | Byron Jones <bjones@mozilla.com> | 2013-03-26 16:26:41 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-03-26 16:26:41 +0100 |
commit | b09e5ff2dd0b97a0254e922183abd79025c2e69a (patch) | |
tree | 397282330b4066925d0b4c4c678df6bf809b90bd /Bugzilla/Flag.pm | |
parent | 7f31fde3a03881e59220e824a4ea390f65608ed9 (diff) | |
download | bugzilla-b09e5ff2dd0b97a0254e922183abd79025c2e69a.tar.gz bugzilla-b09e5ff2dd0b97a0254e922183abd79025c2e69a.tar.xz |
Bug 854901: don't allow setting a flag's requestee to a disabled account
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r-- | Bugzilla/Flag.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 2f6ee526f..6e75af51a 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -686,9 +686,15 @@ sub _check_requestee { # is specifically requestable. For existing flags, if the requestee # was set before the flag became specifically unrequestable, the # user can either remove him or leave him alone. - ThrowCodeError('flag_requestee_disabled', { type => $self->type }) + ThrowCodeError('flag_type_requestee_disabled', { type => $self->type }) if !$self->type->is_requesteeble; + # BMO customisation: + # You can't ask a disabled account, as they don't have the ability to + # set the flag. + ThrowUserError('flag_requestee_disabled', { requestee => $requestee }) + if !$requestee->is_enabled; + # Make sure the requestee can see the bug. # Note that can_see_bug() will query the DB, so if the bug # is being added/removed from some groups and these changes |