[turba] Correct Way to Implement Public & Private Addressbook s?

m.ibarra@cdcixis-na.com m.ibarra@cdcixis-na.com
Thu, 27 Sep 2001 09:49:18 -0400


Since posting this message, I've already done what you've
suggested but I am still having the same results. Here is
my entire horde/turba/config/sources.php file.

Question/s.

1. Should I have made changes anywhere else? 
2. Should I have done something different when I
   created this mysql entry in order for it to
   be private?

Current results.
1. A search for a name shows what is contained in 
   both Public and Private List, regardless of 
   who created the entry.

---SOURCES.PHP FILE----

<?php
// $Horde: turba/config/sources.php.dist,v 1.20 2001/09/26 18:09:15 jan Exp
$

$cfgSources = array();

$cfgSources['netcenter'] = array(
    'title' => 'Netcenter Member Directory',
    'type' => 'ldap',
    'params' => array(
        'server' => 'memberdir.netscape.com',
        'port' => 389,
        'root' => 'ou=member_directory,o=netcenter.com',
        'dn' => array('cn'),
        'objectclass' => 'person',
        'filter' => ''
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'alias' => 'givenname'
    ),
    'public' => true,
    'readonly' => true,
    'export' => false
);

$cfgSources['bigfoot'] = array(
    'title' => 'Bigfoot',
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldap.bigfoot.com',
        'port' => 389,
        'root' => ''
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'alias' => 'givenname'
    ),
    'public' => true,
    'readonly' => true,
    'export' => false
);

$cfgSources['verisign'] = array(
    'title' => 'Verisign Directory',
    'type' => 'ldap',
    'params' => array(
        'server' => 'directory.verisign.com',
        'port' => 389,
        'root' => '',
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
    ),
    'public' => true,
    'readonly' => true,
    'export' => false
);

$cfgSources['localsql'] = array(
    'title' => 'Public List',
    'type' => 'sql',
    'params' => array(
        'phptype' => 'mysql',
        'hostspec' => 'localhost',
        'username' => 'hordeuser',
        'password' => 'hordeuserPASS',
        'database' => 'horde',
        'options' => '',
        'tty' => '',
        'port' => '4102',
        'protocol' => 'unix',
        'table' => 'Turba_Objects'
    ),
    'map' => array(
        '__key' => 'object_ID',
        '__owner' => 'owner_ID',
    	'name' => 'name',
    	'email' => 'email',
    	'homeAddress' => 'homeAddress',
    	'workAddress' => 'workAddress',
    	'homePhone' => 'homePhone',
    	'workPhone' => 'workPhone',
        'cellPhone' => 'cellPhone',
    	'fax' => 'fax',
    	'title' => 'title',
    	'company' => 'company',
    	'notes' => 'notes'
    ),
    'public' => true,
    'readonly' => false,
    'export' => false
);

$cfgSources['privatesql'] = array(
    'title' => 'Private List',
    'type' => 'sql',
    'params' => array(
        'phptype' => 'mysql',
        'hostspec' => 'localhost',
        'username' => 'hordeuser',
        'password' => 'hordeuserPASS',
        'database' => 'horde',
        'options' => '',
        'tty' => '',
        'port' => '4102',
        'protocol' => 'unix',
        'table' => 'turba_objects_private'
    ),
    'map' => array(
        '__key' => 'object_ID',
        '__owner' => 'owner_ID',
    	'name' => 'name',
    	'email' => 'email',
    	'homeAddress' => 'homeAddress',
    	'workAddress' => 'workAddress',
    	'homePhone' => 'homePhone',
    	'workPhone' => 'workPhone',
        'cellPhone' => 'cellPhone',
    	'fax' => 'fax',
    	'title' => 'title',
    	'company' => 'company',
    	'notes' => 'notes'
    ),
    'public' => false,
    'readonly' => false,
    'export' => false
);

?>

-----Original Message-----
From: Chuck Hagenbuch [mailto:chuck@horde.org]
Sent: Wednesday, September 26, 2001 5:46 PM
To: turba@lists.horde.org
Subject: RE: [turba] Correct Way to Implement Public & Private
Addressbook s?


You're using the exact same database table for these. The system isn't
designed 
that way - use a different table (just in name - the schemas will match) for

the public and private addressbooks.