[turba] turba privaty and authentication problem

ezbeans UDDWROROFMLX at spammotel.com
Mon Jun 27 06:53:19 PDT 2005


Well I have part of the solution but I am also missing something.
You need to copy the tubra_objects table to create a new database
table we can call it  tubra_personal. Next I created a second set of
functions for the new personal address book and changed the
$cfgSources['localsql'] = array(
               to 'localsql2'
and changed
'params' => array_merge($conf['sql'], array('table' => 'turba_objects')),
                                                                             
   to 'turba_personal'

This gave me the both address books but I cannot figure out how
to make the personal one work off of the uid from horde.

Maybe someone can help fill the gaps... seems like it would be a common
requested feature maybe it should come this way as an example...(HINT HINT).

Here are my settings for the second address book the
first one is default that comes in the sources.php file
================================
/**
 * A local address book in an SQL database. This implements a per-user
 * address book.
 *
 * Be sure to create a turba_objects table in your Horde database
 * from the schema in turba/scripts/drivers/turba.sql if you use
 * this source.
*/
       $cfgSources['localsql2'] = array(
        'title' => 'Personal Addressbook',
        'type' => 'sql',
      'params' => array_merge($conf['sql'], array('table' => 
'turba_personal')),
       //'params' => array(
       //  'phptype' => 'mysql',
       //   'hostspec' => 'localhost',
       //   'username' => 'horde',
       //   'password' => '*****',
       //   'database' => 'horde',
       //   'table' => 'turba_objects'
       // ),
      'map' => array(
           '__key' => 'object_id',
           '__owner' => 'owner_id',
           '__type' => 'object_type',
           '__members' => 'object_members',
           'name' => 'object_name',
           'email' => 'object_email',
           'homeAddress' => 'object_homeaddress',
           'workAddress' => 'object_workaddress',
           'homePhone' => 'object_homephone',
           'workPhone' => 'object_workphone',
           'cellPhone' => 'object_cellphone',
           'fax' => 'object_fax',
           'title' => 'object_title',
           'company' => 'object_company',
           'notes' => 'object_notes'
      ),
      'search' => array(
           'name',
           'email'
      ),
      'strict' => array(
           //'object_id',
           'owner_id'
           //'object_type'
      ),
      'public' => false,
      'readonly' => false,
      'export' => true );


Here is the sql to create the table.
================================
CREATE TABLE `horde`.`turba_personal` (
`object_id` varchar( 32 ) NOT NULL default '',
`owner_id` varchar( 255 ) NOT NULL default '',
`object_type` varchar( 255 ) NOT NULL default 'Object',
`object_uid` varchar( 255 ) default NULL ,
`object_members` blob,
`object_name` varchar( 255 ) default NULL ,
`object_alias` varchar( 32 ) default NULL ,
`object_email` varchar( 255 ) default NULL ,
`object_homeaddress` varchar( 255 ) default NULL ,
`object_workaddress` varchar( 255 ) default NULL ,
`object_homephone` varchar( 25 ) default NULL ,
`object_workphone` varchar( 25 ) default NULL ,
`object_cellphone` varchar( 25 ) default NULL ,
`object_fax` varchar( 25 ) default NULL ,
`object_title` varchar( 255 ) default NULL ,
`object_company` varchar( 255 ) default NULL ,
`object_notes` text,
`object_pgppublickey` text,
`object_smimepublickey` text,
`object_freebusyurl` varchar( 255 ) default NULL ,
PRIMARY KEY ( `object_id` ) ,
KEY `turba_owner_idx` ( `owner_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;



Sorry I could not be more help,

Ben



"tl.iti" <tl.iti at iti.lt> wrote in message 
news:008301c56c41$cac0e380$d2fea8c0 at takas...
> Hello,
>
>
> Have turba privacy and authentication problem.
> I need to use horde authentication for turba.
>
>
> All users see and modify all addresses. Authentication not needed. :-(
>
>
> But I need, each user have personal(private) "address book" with 
> authentication.
>
> How solve this problem?
> Please help me.
>
> Thanks.
>
> ###########################################################################################################
> I use:
> ###########################################################################################################
> Horde Version Horde: 3.0.2
> Horde Applications
> Accounts: 2.1.1
> Forwards: 2.2.1
> Horde: 3.0.2
> Imp: H3 (4.0.1) (run Imp tests)
> Ingo: H3 (1.0.1) (run Ingo tests)
> Kronolith: H3 (2.0.1)
> Mnemo: H3 (2.0.1)
> Nag: H3 (2.0.1)
> Passwd: 2.2.1
> Turba: H3 (2.0) (run Turba tests)
> ###########################################################################################################
> #
> ###########################################################################################################
>
> ############################################################################################################
> # /horde/turba/config/sources.php:
> ############################################################################################################
> #
> $cfgSources['localsql'] = array(
> 'title' => _("My Addressbook"),
> 'type' => 'sql',
>
> // The default connection details are pulled from the Horde-wide
> // SQL connection configuration.
> //
> // The old example illustrates how to use an alternate database
> // configuration.
> //
> // New Example:
>
> 'params' => array_merge($conf['sql'], array('table' => 'turba_objects')),
>
> // Old Example:
> // 'params' => array(
> // 'phptype' => 'mysql',
> // 'hostspec' => 'localhost',
> // 'username' => 'horde',
> // 'password' => '*****',
> // 'database' => 'horde',
> // 'table' => 'turba_objects',
> // 'charset' => 'iso-8859-1'
> // ),
>
> 'map' => array(
> '__key' => 'object_id',
> '__owner' => 'owner_id',
> '__type' => 'object_type',
> '__members' => 'object_members',
> '__uid' => 'object_uid',
> 'name' => 'object_name',
> 'email' => 'object_email',
> 'alias' => 'object_alias',
> 'homeAddress' => 'object_homeaddress',
> 'workAddress' => 'object_workaddress',
> 'homePhone' => 'object_homephone',
> 'workPhone' => 'object_workphone',
> 'cellPhone' => 'object_cellphone',
> 'fax' => 'object_fax',
> 'title' => 'object_title',
> 'company' => 'object_company',
> 'notes' => 'object_notes',
> 'pgpPublicKey' => 'object_pgppublickey',
> 'smimePublicKey' => 'object_smimepublickey',
> 'freebusyUrl' => 'object_freebusyurl'
> ),
>
> 'search' => array(
> 'name',
> 'email'
> ),
>
> 'strict' => array(
> 'object_id',
> 'owner_id',
> 'object_type',
> ),
>
> 'public' => false,
> 'readonly' => false,
> 'admin' => array(),
> 'export' => true
> );
> #
> ############################################################################################################
> # sources.php:
> ############################################################################################################
> -- 
> Turba mailing list - Join the hunt: http://horde.org/bounties/#turba
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: turba-unsubscribe at lists.horde.org
> 





More information about the turba mailing list