[kronolith] configuring freebusy url

Dominique LALOT dom.lalot at gmail.com
Mon Nov 24 10:31:17 UTC 2008


Jan Schneider a écrit :
> Zitat von Dominique LALOT <dom.lalot at gmail.com>:
> 
>> Jan Schneider a écrit :
>>> Zitat von Dominique LALOT <dom.lalot at gmail.com>:
>>>
>>>> eculp a écrit :
>>>>> Quoting Dominique LALOT <dom.lalot at gmail.com>:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> We have a large internal read-only ldap server for which I don't 
>>>>>> want to add freebusyurl information attributes. I don't want to 
>>>>>> extend the shema..
>>>>>>
>>>>>> When adding new attendees, as soon as I type on the keyboard, I 
>>>>>> can see the result coming as emails (not logins uid)
>>>>>>
>>>>>> I type a name (that should be a login for our use)
>>>>>> search ldap on cn=*name* ->   get cn,sn,givenname,mail,dn
>>>>>>
>>>>>> I select an email, then save attendee, and I get "no freebusy url 
>>>>>> found" for  the email corresponding to the name
>>>>>>
>>>>>> So, I need a hook to say: give me the email, I construct the 
>>>>>> freebusy URL for the default calendar of that person using our 
>>>>>> central ldap directory
>>>>>> mail -> uid -> FBURL
>>>>>>
>>>>>> Is there already a way to do that?
>>>>>
>>>>> I'm not sure how other folks do it but I assign the calFBURL when I 
>>>>> add the ldap user.  If you use a script you would just have to add 
>>>>> an additional line.
>>>>>
>>>>> calFBURL: http://webmail.domain.com/kronolith/fb.php?c=uid@domain.com
>>>>>
>>>>> Maybe someone else will have a better way.
>>>> Thanks ed,  but that's exactly what I don't want to do. It can be 
>>>> computed from a hook. I'm not sure also that there is not a way to 
>>>> dot that, just by customizing the prefs and source files.
>>>>
>>>> I have to change 25000 university entries for a fixed information. 
>>>> I's not worth the change. I'll only do that if there's no other 
>>>> method or if I can't patch for our needs.
>>>
>>> See the example source that Kolab uses in the latest sources.php.dist 
>>> from CVS.
>>>
>>> Jan.
>>>
>> Danke Jan,
>>
>> I've played with the sources.php without success. Is there something 
>> else to patch?
>> I'm adding traces to the code to understand where and why it's not 
>> working
>>
>> I've added freebusyUrl in the map section as written
>>
>>    'map' => array(
>>        '__key' => 'dn',
>>        '__uid' => 'uid',
>>        'name' => 'cn',
>>        'alias' => 'givenname',
>>        'email' => 'mail',
>>        'workPhone' => 'telephonenumber',
>>        'freebusyUrl' => array('fields' => array('ourserverURL', 'uid'),
>>                'format' => 'https://%s/horde/kronolith/fb.php?u=%s '),
>>    ),
> 
> Please read the documentation! Do you have an 'ourserverURL' at all? 
> Probably not. The configuration should instead look like:
> 
> 'freebusyUrl' => array('fields' => array('name'),
>                        'format' => 
> Horde::url($GLOBALS['registry']->get('webroot', 'kronolith') . 'fb.php', 
> true, -1) . '?u=%s'),
> 
When it will work, I'll do this which is the right way to do that
> 
> But don't copy this blindly, this is untested code.
> 
> Jan.
> 
Jan,

I didn't want to show my URL for security reason..

I add some trace to check the code (I manage openldap for more that 7 
years now)

So here is a trace:

Nov 24 10:58:28 HORDE [error] [turba] trace localldap [pid 17066 on line 
1876 of "/var/www/perso/horde-webmail-1.2/turba/lib/api.php"]
Nov 24 10:58:28 HORDE [debug] [turba] LDAP query by 
Turba_Driver_ldap::_search(): user = lalot, root = 
ou=people,dc=univ,dc=fr (xx.univ.fr yy.univ.fr); filter = 
"(&(|(objectclass=univperson)(objectclass=univpersdivers))(&(mail=d.lalot at univ.fr)))"; 
attributes = "dn, uid, cn, givenname, mail, telephonenumber, 
mobiletelephonenumber, sn"; deref = "0"  ; sizelimit = 100 [pid 17066 on 
line 186 of "/var/www/perso/horde-webmail-1.2/turba/lib/Driver/ldap.php"]

I've added a fake and quick freebusyURL attribute in my schema  but no 
values in my entry. You can see that freebusyURL is not in the attribute 
list and no freebusyURL is returned.
I'm not sure that the sources.php is the right way to do what I want. Is 
the map only there for changing names?  ask for email should be mapped 
to mail for the ldap driver. So what is the meaning of freebusyURL in 
that map?
There should be something else to say: that attribute is computed, not 
fetch by the driver in a database.


     'map' => array(
         '__key' => 'dn',
         '__uid' => 'uid',
         'name' => 'cn',
         'alias' => 'givenname',
         'email' => 'mail',
         'workPhone' => 'telephonenumber',
         'cellPhone' => 'mobiletelephonenumber', #add this one and is in 
the attribute list but no freebusyURL
         'freebusyUrl' => array('fields' => 
array('hordetest.pr.univ.fr', 'uid'),
                 'format' => 'https://%s/horde/kronolith/fb.php?u=%s '),
     ),

Thanks

Dom

-- 
Dominique LALOT
Ingenieur Systeme et Reseaux
Universite de la Mediterrane (Aix-Marseille 2)
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the kronolith mailing list