diff options
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-x | editproducts.cgi | 12 |
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 " . |