summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-07-21 18:07:27 +0200
committermkanat%bugzilla.org <>2009-07-21 18:07:27 +0200
commite5164f3eff5adebb42bf63a8423beaed422ce7f6 (patch)
tree85faa863d1cf2191be05df913137c0ec754a8f38 /Bugzilla/Bug.pm
parentc9ce039ea505c16c586dea94ad91d98bfc1ef0e3 (diff)
downloadbugzilla-e5164f3eff5adebb42bf63a8423beaed422ce7f6.tar.gz
bugzilla-e5164f3eff5adebb42bf63a8423beaed422ce7f6.tar.xz
Bug 505390: Make Bugzilla (and thus the WebService) throw an error when you try to add a private comment but aren't an insider.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 8b140e92f..9b0bac1e1 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1192,9 +1192,10 @@ sub _check_comment {
sub _check_commentprivacy {
my ($invocant, $comment_privacy) = @_;
- my $insider_group = Bugzilla->params->{"insidergroup"};
- return ($insider_group && Bugzilla->user->in_group($insider_group)
- && $comment_privacy) ? 1 : 0;
+ if ($comment_privacy && !Bugzilla->user->is_insider) {
+ ThrowUserError('user_not_insider');
+ }
+ return $comment_privacy ? 1 : 0;
}
sub _check_comment_type {