From 879596beb3237dd94f55f02ca343a5eb02f42178 Mon Sep 17 00:00:00 2001 From: skeeter Date: Tue, 30 Jan 2001 04:06:42 +0000 Subject: [PATCH] deletes entries before inserting them --- setup/ldap.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setup/ldap.php b/setup/ldap.php index d166d2d400..bbe25de608 100644 --- a/setup/ldap.php +++ b/setup/ldap.php @@ -81,10 +81,18 @@ if (!empty($account[1]["account_id"]) && !empty($account[1]["account_lid"])) @reset($s_apps); while ($app = each($s_apps)) { + $sql = "DELETE FROM phpgw_acl WHERE acl_appname='".$app[1]."' AND acl_location='run' AND acl_account=" + . $account[1]["account_id"]." AMD acl_account_type='u'"; + $phpgw_setup->db->query($sql ,__LINE__,__FILE__); + $sql = "insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)" . " values('".$app[1]."','run',".$account[1]["account_id"].",'u',1)"; $phpgw_setup->db->query($sql ,__LINE__,__FILE__); } + $sql = "DELETE FROM phpgw_acl WHERE acl_appname='admin' AND acl_location='run' AND acl_account=" + . $account[1]["account_id"]." AMD acl_account_type='u'"; + $phpgw_setup->db->query($sql ,__LINE__,__FILE__); + $sql = "insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)" . " values('admin','run',".$account[1]["account_id"].",'u',1)"; $phpgw_setup->db->query($sql ,__LINE__,__FILE__); @@ -150,7 +158,7 @@