[Owncloud] ldap groups in an addressbook
Arthur Schiwon
blizzz at owncloud.com
Wed Apr 3 15:19:33 UTC 2013
On 04/03/2013 05:00 PM, Nicolas Mora wrote:
> Le 03/04/2013 10:02, Arthur Schiwon a écrit :
>>
>> As of ownCloud 5, user_ldap can have unlimited LDAP servers
>> configured. Even on-the-fly connections are possible. I would say it
>> basically has everything that you need.
>>
> OK then, I will implement the connection with user_ldap.
>
> It would be interesting to add the possibility for a user to add a ldap
> connection for himself then, like in the personal settings page.
This will not happen within user_ldap. With user_ldap, users are already
connected via LDAP.
Nevertheless it is open to you to offer such a settings.
The only thing you need to do with user_ldap is to initialize Connection
like
$connection = OCA\user_ldap\lib\Connection('', null);
and pass settings by
$connection->setConfiguration($config);
With $config being an associated array with the config. How it looks
like you can see how it is defined in line 36 of the Connection class or
look at what you get from $connection->getConfiguration(); (also before
setting the config, default values are used).
With them you can just instatiate the real backend by
$userBackend = new OCA\user_ldap\USER_LDAP();
$userBackend->setConnector($connection);
$groupBackend = new OCA\user_ldap\GROUP_LDAP();
$groupBackend->setConnector($connection);
or you just subclass OCA\user_ldap\lib\Access if you don't need the
\OCP\UserInterface and \OCP\GroupInterface stuff.
Cheers
Arthur
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
More information about the Owncloud
mailing list