accounts->read_group_names(); if (is_array($memberships) && count($memberships) > 0){ for ($idx = 0; $idx < count($memberships); ++$idx){ $sql .= ",".$memberships[$idx][0]; } } $sql .= ")))"; $rights = 0; $phpgw->db->query($sql ,__LINE__,__FILE__); if ($phpgw->db->num_rows() == 0 && $phpgw_info["server"]["acl_default"] != "deny"){ return True; } while ($phpgw->db->next_record()) { if ($phpgw->db->f("acl_rights") == 0){ return False; } $rights |= $phpgw->db->f("acl_rights"); } return !!($rights & $required); } function add($app, $location, $id, $id_type, $rights){ $sql = "insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)"; $sql .= " values('".$app."', '".$location."', ".$id.", '".$id_type."', ".$rights.")"; $phpgw->db->query($sql ,__LINE__,__FILE__); return True; } function delete($app, $location, $id, $id_type){ $sql = "delete from phpgw_acl where acl_appname='".$app."'"; $sql .= " and acl_location ='".$location."' and "; $sql .= " acl_account_type = '".$id_type."' and acl_account = ".$id.")"; $phpgw->db->query($sql ,__LINE__,__FILE__); return True; } function view($app, $location, $id, $id_type){ } } //end of acl class ?>