COMMENT_COLS
+ DERIVE_GROUPS_TABLES_ALREADY_LOCKED
+
UNLOCK_ABORT
RELATIONSHIPS
# The column length for displayed (and wrapped) bug comments.
use constant COMMENT_COLS => 80;
+# Used to indicate to User::new and User::new_from_login calls
+# that the derive_groups tables are already locked
+use constant DERIVE_GROUPS_TABLES_ALREADY_LOCKED => 1;
+
# used by Bugzilla::DB to indicate that tables are being unlocked
# because of error
use constant UNLOCK_ABORT => 1;
use Bugzilla::BugMail;
use Bugzilla::Constants;
-use constant TABLES_ALREADY_LOCKED => 1;
-
# Note that this line doesn't actually import these variables for some reason,
# so I have to use them as $::template and $::vars in the package code.
use vars qw($template $vars);
my @new_cc_list;
foreach my $cc (split(/[, ]+/, $flag->{'type'}->{'cc_list'})) {
my $ccuser = Bugzilla::User->new_from_login($cc,
- TABLES_ALREADY_LOCKED)
+ DERIVE_GROUPS_TABLES_ALREADY_LOCKED)
|| next;
next if $flag->{'target'}->{'bug'}->{'restricted'}
$dbh->bz_lock_tables('whine_schedules WRITE',
'whine_events READ',
- 'profiles READ',
+ 'profiles WRITE',
'groups READ',
- 'user_group_map READ');
+ 'group_group_map READ',
+ 'user_group_map WRITE');
# Get the event ID for the first pending schedule
$sth_next_scheduled_event->execute;
return undef unless $fetched;
my ($eventid, $owner_id, $subject, $body) = @{$fetched};
- my $owner = Bugzilla::User->new($owner_id);
+ my $owner = Bugzilla::User->new($owner_id,
+ DERIVE_GROUPS_TABLES_ALREADY_LOCKED);
my $whineatothers = $owner->in_group('bz_canusewhineatothers');