diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-22 12:19:06 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-27 12:00:43 +0200 |
commit | 6385a5af36957cac4e1beed531d941129eb3a5a0 (patch) | |
tree | 76235c0d45827b7ac68b534e18e3e79d23a99ba9 /apps/user_ldap/lib/Group_LDAP.php | |
parent | 3c2b126eba063bd056458be50e96d3015d62b66a (diff) | |
download | nextcloud-server-6385a5af36957cac4e1beed531d941129eb3a5a0.tar.gz nextcloud-server-6385a5af36957cac4e1beed531d941129eb3a5a0.zip |
Let OC\Group\Group handle the fallback and remove default implementation from ABackend
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib/Group_LDAP.php')
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index ca3a6d13e8f..fac71093665 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -48,12 +48,11 @@ use Exception; use OC\ServerNotAvailableException; use OCP\Cache\CappedMemoryCache; use OCP\GroupInterface; -use OCP\Group\Backend\ABackend; use OCP\Group\Backend\IDeleteGroupBackend; use OCP\Group\Backend\IGetDisplayNameBackend; use Psr\Log\LoggerInterface; -class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP, IGetDisplayNameBackend, IDeleteGroupBackend { +class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, IGetDisplayNameBackend, IDeleteGroupBackend { protected bool $enabled = false; /** @var CappedMemoryCache<string[]> $cachedGroupMembers array of users with gid as key */ @@ -64,7 +63,6 @@ class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP, IGetDis protected CappedMemoryCache $cachedNestedGroups; protected GroupPluginManager $groupPluginManager; protected LoggerInterface $logger; - protected Access $access; /** * @var string $ldapGroupMemberAssocAttr contains the LDAP setting (in lower case) with the same name @@ -72,7 +70,7 @@ class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP, IGetDis protected string $ldapGroupMemberAssocAttr; public function __construct(Access $access, GroupPluginManager $groupPluginManager) { - $this->access = $access; + parent::__construct($access); $filter = $this->access->connection->ldapGroupFilter; $gAssoc = $this->access->connection->ldapGroupMemberAssocAttr; if (!empty($filter) && !empty($gAssoc)) { @@ -1333,11 +1331,4 @@ class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP, IGetDis $this->access->connection->writeToCache($cacheKey, $displayName); return $displayName; } - - public function searchInGroup(string $gid, string $search = '', int $limit = -1, int $offset = 0): array { - if (!$this->enabled) { - return []; - } - return parent::searchInGroup($gid, $search, $limit, $offset); - } } |