diff options
author | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2017-11-02 10:40:38 -0200 |
---|---|---|
committer | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2017-11-03 11:41:40 -0200 |
commit | 10ca793452e75ecd276589f8ad916f3090ecb441 (patch) | |
tree | 2d902024afb03a4f88356b68b97369f86cec8372 /lib/public | |
parent | 576d31d48d1e368c0ca54a95f28dc3bc0e553d83 (diff) | |
download | nextcloud-server-10ca793452e75ecd276589f8ad916f3090ecb441.tar.gz nextcloud-server-10ca793452e75ecd276589f8ad916f3090ecb441.zip |
Plugins infrastructure in User_LDAP
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/IGroupManager.php | 7 | ||||
-rw-r--r-- | lib/public/LDAP/ILDAPProvider.php | 50 |
2 files changed, 56 insertions, 1 deletions
diff --git a/lib/public/IGroupManager.php b/lib/public/IGroupManager.php index be322b64325..778a0ef169c 100644 --- a/lib/public/IGroupManager.php +++ b/lib/public/IGroupManager.php @@ -66,6 +66,13 @@ interface IGroupManager { public function clearBackends(); /** + * Get the active backends + * @return \OCP\GroupInterface[] + * @since 13.0.0 + */ + public function getBackends(); + + /** * @param string $gid * @return \OCP\IGroup * @since 8.0.0 diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php index 3c07dfcbe8e..03ac54d01e3 100644 --- a/lib/public/LDAP/ILDAPProvider.php +++ b/lib/public/LDAP/ILDAPProvider.php @@ -3,6 +3,10 @@ * * @copyright Copyright (c) 2016, Roger Szabo (roger.szabo@web.de) * + * @author Roger Szabo <roger.szabo@web.de> + * @author Vinicius Brand <vinicius@eita.org.br> + * @author Daniel Tygel <dtygel@eita.org.br> + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -36,7 +40,15 @@ interface ILDAPProvider { * @since 11.0.0 */ public function getUserDN($uid); - + + /** + * Translate a group id to LDAP DN. + * @param string $gid group id + * @return string + * @since 13.0.0 + */ + public function getGroupDN($gid); + /** * Translate a LDAP DN to an internal user name. * @param string $dn LDAP DN @@ -69,6 +81,14 @@ interface ILDAPProvider { * @since 11.0.0 */ public function getLDAPConnection($uid); + + /** + * Return a new LDAP connection resource for the specified group. + * @param string $gid group id + * @return resource of the LDAP connection + * @since 13.0.0 + */ + public function getGroupLDAPConnection($gid); /** * Get the LDAP base for users. @@ -102,4 +122,32 @@ interface ILDAPProvider { * @since 11.0.0 */ public function clearCache($uid); + + /** + * Get the LDAP attribute name for the user's display name + * @param string $uid user id + * @return string the display name field + * @throws \Exception if user id was not found in LDAP + * @since 12.0.0 + */ + public function getLDAPDisplayNameField($uid); + + /** + * Get the LDAP attribute name for the email + * @param string $uid user id + * @return string the email field + * @throws \Exception if user id was not found in LDAP + * @since 12.0.0 + */ + public function getLDAPEmailField($uid); + + /** + * Get the LDAP attribute name for the type of association betweeen users and groups + * @param string $gid group id + * @return string the configuration, one of: 'memberUid', 'uniqueMember', 'member', 'gidNumber' + * @throws \Exception if group id was not found in LDAP + * @since 13.0.0 + */ + public function getLDAPGroupMemberAssoc($gid); + } |