From e497100c07aa95e315c4c881d54cb88e57675e80 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 23 Jul 2015 12:24:32 +0800 Subject: Bug 1185823 - add additional [audit] syslog entries --- Bugzilla/Bug.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 042f9c801..76b845f71 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1028,6 +1028,12 @@ sub update { my @added_names = map { $new_groups{$_}->name } @$added_gr; $changes->{'bug_group'} = [join(', ', @removed_names), join(', ', @added_names)]; + + # we only audit when bugs protected with a secure-mail enabled group + # are made public + if (!scalar @{ $self->groups_in } && any { $old_groups{$_}->secure_mail } @$removed_gr) { + Bugzilla->audit(sprintf('%s made Bug %s public (%s)', $user->login, $self->id, $self->short_desc)); + } } # Comments and comment tags -- cgit v1.2.3-24-g4f1b