# cc, bug_group_map, user_group_map, and groups are in here so we
# can check the permissions of flag requestees and email addresses
# on the flag type cc: lists via the CanSeeBug
- # function call in Flag::notify. group_group_map is in here in case
- # Bugzilla::User needs to rederive groups. profiles and
- # user_group_map would be READ locks instead of WRITE locks if it
- # weren't for derive_groups, which needs to write to those tables.
- 'bugs WRITE', 'profiles WRITE', 'email_setting READ',
- 'cc READ', 'bug_group_map READ', 'user_group_map WRITE',
+ # function call in Flag::notify. group_group_map is in here si
+ # Bugzilla::User can flatten groups.
+ 'bugs WRITE', 'profiles READ', 'email_setting READ',
+ 'cc READ', 'bug_group_map READ', 'user_group_map READ',
'group_group_map READ', 'groups READ');
# Get a copy of the attachment record before we make changes
# Add the bug report to the DB.
$dbh->bz_lock_tables('bugs WRITE', 'bug_group_map WRITE', 'longdescs WRITE',
'cc WRITE', 'keywords WRITE', 'dependencies WRITE',
- 'bugs_activity WRITE', 'groups READ', 'user_group_map READ',
+ 'bugs_activity WRITE', 'groups READ',
+ 'user_group_map READ', 'group_group_map READ',
'keyworddefs READ', 'fielddefs READ');
SendSQL($sql);
$comment .= "If all went well, please mark this bug verified, and paste\n";
$comment .= "in a link to the new bug. Otherwise, reopen this bug.\n";
- # $user->derive_groups() has already been called by Bugzilla->login(),
- # so the related tables do not need to be locked.
$dbh->bz_lock_tables('bugs WRITE', 'bugs_activity WRITE', 'duplicates WRITE',
'longdescs WRITE', 'profiles READ', 'groups READ',
'bug_group_map READ', 'group_group_map READ',
# whether we do LOW_PRIORITY ...
$dbh->bz_lock_tables("bugs $write", "bugs_activity $write",
"cc $write", "cc AS selectVisible_cc $write",
- "profiles $write", "dependencies $write", "votes $write",
+ "profiles READ", "dependencies $write", "votes $write",
"products READ", "components READ",
"keywords $write", "longdescs $write", "fielddefs $write",
"bug_group_map $write", "flags $write", "duplicates $write",
- # user_group_map would be a READ lock except that Flag::process
- # may call Flag::notify, which creates a new user object,
- # which might call derive_groups, which wants a WRITE lock on that
- # table. group_group_map is in here at all because derive_groups
- # needs it.
- "user_group_map $write", "group_group_map READ", "flagtypes READ",
+ "user_group_map READ", "group_group_map READ", "flagtypes READ",
"flaginclusions AS i READ", "flagexclusions AS e READ",
"keyworddefs READ", "groups READ", "attachments READ",
"group_control_map AS oldcontrolmap READ",
$dbh->bz_lock_tables('bugs READ', 'products READ', 'votes WRITE',
'cc READ', 'bug_group_map READ', 'user_group_map READ',
+ 'group_group_map READ',
'cc AS selectVisible_cc READ', 'groups READ');
if ($canedit && $bug_id) {
$dbh->bz_lock_tables('whine_schedules WRITE',
'whine_events READ',
- 'profiles WRITE',
+ 'profiles READ',
'groups READ',
'group_group_map READ',
- 'user_group_map WRITE');
+ 'user_group_map READ');
# Get the event ID for the first pending schedule
$sth_next_scheduled_event->execute;