[turba] MysqL + Ldap directories search OK, hide edit-delete links for Ldap entries

Ludo lgnr at laposte.net
Fri Sep 29 00:08:22 PDT 2006


Hi.
My config : Fedora core 4 and Horde + IMP + TURBA + Passwd
(last versions)

Turba : localmysql book for users + One or more LDAP
Directories described in conf files ('readonly' => true,)

When users search contacts in LDAP Directory, they find what
they need but on click to look each description, they are
still able to edit or delete Ldap contacts (with an error of
course).

How could I let edit/delete links for personnal mysql entries
and hide those for LDAP entries ?

Thanks a lot
Ludovic








<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: turba/config/conf.xml,v 1.6.2.3 2006/05/09 15:58:10
jan Exp $
$conf['menu']['import_export'] = true;
$conf['menu']['apps'] = array('imp');
$conf['client']['addressbook'] = 'localsql, Annuaire1, Annuaire2';
$conf['comments']['allow'] = true;
$conf['documents']['type'] = 'none';
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

<?php

$cfgSources['localsql'] = array(
    'title' => _("My Address Book"),
    'type' => 'sql',
    'params' => array_merge($conf['sql'], array('table' =>
'turba_objects')),
    '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',
    ),
    'export' => true,
    'browse' => true,
    'use_shares' => false,
);

if (Util::extensionExists('ldap')) {

$cfgSources['Annuaire1'] = array(
     'title' => _("Annuaire XXX"),
     'type' => 'ldap',
     'params' => array(
     'server' => 'ldap.xxxx.fr',
     'port' => 389,
     'tls' => false,
     'root' => 'dc=xxxx,dc=fr',
     'sizelimit' => 50,
     'dn' => array('cn'),
     'objectclass' => array('top',
'person','organizationalUnit','inetOrgPerson'),
//         'filter' => '',
     'scope' => 'sub',
     'charset' => 'utf-8',
     'checkrequired' => false,
     'version' => 3
     ),
     'map' => array(
         '__key' => 'dn',
//         '__uid' => 'uid',
         'name' => 'cn',
         'email' => 'mail',
//         'alias' => 'givenName'
         'workPhone' => 'telephoneNumber'
    ),
         'search' => array(
         'name',
         'email'
//         'alias'
     ),
     'strict' => array(
         'dn'
     ),
     'public' => true,
     'readonly' => true,
     'admin' => array(),
     'export' => false
//       'browse' => true,
 );

etc ...


Accédez au courrier électronique de La Poste 
sur www.laposte.net ou sur 3615 LAPOSTENET (0,34€ TTC /mn) 
1 Giga de stockage gratuit – Antispam et antivirus intégrés 





More information about the turba mailing list