summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-28 01:33:41 +0200
committerbugreport%peshkin.net <>2004-07-28 01:33:41 +0200
commit443ba65dcc14aae3278c4f5f152f942f87bc4f08 (patch)
tree672a2374c34df475b352cc3d975338fd0c1e683d /editproducts.cgi
parentbc9e63eff68258eeed0e0cc043f48c362183411f (diff)
downloadbugzilla-443ba65dcc14aae3278c4f5f152f942f87bc4f08.tar.gz
bugzilla-443ba65dcc14aae3278c4f5f152f942f87bc4f08.tar.xz
Bug 251837: Extend group_group_map to control which groups can see each other
r=kiko a=justdave
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-xeditproducts.cgi12
1 files changed, 8 insertions, 4 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index 99640a44e..bd71bdd6d 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -394,10 +394,14 @@ if ($action eq 'new') {
SendSQL("SELECT last_insert_id()");
my $gid = FetchOneColumn();
my $admin = GroupNameToId('admin');
- SendSQL("INSERT INTO group_group_map (member_id, grantor_id, isbless)
- VALUES ($admin, $gid, 0)");
- SendSQL("INSERT INTO group_group_map (member_id, grantor_id, isbless)
- VALUES ($admin, $gid, 1)");
+ # If we created a new group, give the "admin" group priviledges
+ # initially.
+ SendSQL("INSERT INTO group_group_map (member_id, grantor_id, grant_type)
+ VALUES ($admin, $gid," . GROUP_MEMBERSHIP .")");
+ SendSQL("INSERT INTO group_group_map (member_id, grantor_id, grant_type)
+ VALUES ($admin, $gid," . GROUP_BLESS .")");
+ SendSQL("INSERT INTO group_group_map (member_id, grantor_id, grant_type)
+ VALUES ($admin, $gid," . GROUP_VISIBLE .")");
# Associate the new group and new product.
SendSQL("INSERT INTO group_control_map " .