[horde] Fwd: Re: [Kolab-devel] [PATCH] Fix for kolab webclient metoo function on forwarding

Chuck Hagenbuch chuck at horde.org
Wed Dec 3 17:53:42 PST 2003


I've added something like the code at the bottom of this message to Horde CVS.
I'd really appreciate it if someone who's more of an LDAP guru/user could take
a look at it and test it.

Quoting Jan Schneider <jan at horde.org>:

>
>
> ----- Weitergeleitete Nachricht von Dan at ohnesorg.cz -----
>     Datum: Mon, 1 Dec 2003 18:57:36 +0100
>     Von: Dan Ohnesorg <Dan at ohnesorg.cz>
> Antwort an: Kolab development coordination <kolab-devel at intevation.org>
>  Betreff: Re: [Kolab-devel] [PATCH] Fix for kolab webclient metoo function
> on forwarding
>       An: Kolab development coordination <kolab-devel at intevation.org>
>
> Dne Mon, Dec 01, 2003 at 12:36:30PM +0100, Jan Schneider napsal:
>
> > > I have just found, that I am not able to send meeting request - there is
> > > not
> > > default account set and moment needs them.
> >
> > That's right, you need to create an identity first. If user information is
> > stored on the Kolab server, this could be done automagically by a hook on
> > first time login.
>
> I dont like this idea too match. If You will copy the setting, any change
> made over kolab admin interface won't be reflected in the user identity.
>
> I have seen, that someone had alerady solved a part of the prefs storage. I
> have made the same, just enabling LDAP works and stores the preferencies.
> Yes you need extend LDAP, but its the LDAP nature, be so extended to hold
> any info about user on one place for all the systems (and make replicas to
> prevent data loss and better performance).
>
> You will only go into problem by users, which don't have needed objectClass,
> so I have patched ldap.php to check it and if needed extend the user to
> hordePerson, so the saving sucess. This should be probably part od horde,
> not part of kolab, because any ldap backend will have problem with user,
> which don't have proper object class.
>
> The patch is here:
>
> *** ldap.php.orig	Thu Oct  2 11:22:25 2003
> --- ldap.php	Mon Dec  1 18:12:06 2003
> ***************
> *** 510,515 ****
> --- 510,546 ----
>               }
>           }
>
> + 		/* OK we will set preferences, but can we? = check object types */
> + 		$attrib = array('objectclass');
> + 		$search = ldap_search($this->connection, $this->params['basedn'],
> +                               $this->params['uid'] . '=' .
> $this->user,$attrib);
> +         if ($search) {
> +             $result = ldap_get_entries($this->connection, $search);
> +         } else {
> +             Horde::logMessage('Failed to connect to LDAP preferences
> server.', __FILE__, __LINE__);
> +         }
> +         $top = 0;
> +         $hordeperson = 0;
> +         /* I hope the uid is unique */
> +         if ($result) {
> +         	for ($i=0; $i<$result[0]['objectclass']["count"]; $i++) {
> +         		if (strcasecmp($result[0]["objectclass"][$i],'top') == 0)
> +         			$top = 1;
> +           		if (strcasecmp($result[0]["objectclass"][$i],'hordeperson') ==
> 0)
> +         			$hordeperson = 1;
> +    		    }
> +         }
> +         /* in case that account hasn't needed object type -> add them */
> +         if ($top == 0) {
> +         	$add['objectclass'] = 'top';
> +         	ldap_mod_add($this->connection, $this->dn, $add);
> +         }
> +
> +         if ($hordeperson == 0) {
> +         	$add['objectclass'] = 'hordePerson';
> +         	ldap_mod_add($this->connection, $this->dn, $add);
> +         }
> +
>           /* Send the hash to the LDAP server. */
>           if (ldap_mod_replace($this->connection, $this->dn, $new_values)) {
>               foreach ($dirty_prefs as $pref) {
>
>
> You can also made the user direct with top and hordePerson, but some users
> will never use webclient.
>
> cheers
> dan
>
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at intevation.org
> https://kroupware.org/mailman/listinfo/kolab-devel
>
>
>
> ----- Ende der weitergeleiteten Nachricht -----
>
>
> Jan.
>
> --
> http://www.horde.org - The Horde Project
> http://www.ammma.de - discover your knowledge
> http://www.tip4all.de - Deine private Tippgemeinschaft
>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
>


-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"I'm really... I'm not too fascinated by green food." - Average Joe



More information about the horde mailing list