diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-06-19 08:29:25 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-06-19 08:29:25 +0200 |
commit | 6adddb3095abc447c30fb3f8c46c26507895c660 (patch) | |
tree | 43a766e7af4c844d416195f17ab463fc71fc3e79 /lib | |
parent | a5eb2f01a9722abfee0aba9fdfaaa723f77dd47f (diff) | |
parent | 497fe93b6c0a7de212e69ec8a343867cb4904dca (diff) | |
download | nextcloud-server-6adddb3095abc447c30fb3f8c46c26507895c660.tar.gz nextcloud-server-6adddb3095abc447c30fb3f8c46c26507895c660.zip |
Merge pull request #16889 from owncloud/group-sorting-fixes
Only sort by group name when LDAP is involved
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/group/manager.php | 18 | ||||
-rw-r--r-- | lib/public/igroupmanager.php | 9 |
2 files changed, 27 insertions, 0 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 12136a1bd25..70263fc2afa 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -98,6 +98,24 @@ class Manager extends PublicEmitter implements IGroupManager { } /** + * Checks whether a given backend is used + * + * @param string $backendClass Full classname including complete namespace + * @return bool + */ + public function isBackendUsed($backendClass) { + $backendClass = strtolower(ltrim($backendClass, '\\')); + + foreach ($this->backends as $backend) { + if (strtolower(get_class($backend)) === $backendClass) { + return true; + } + } + + return false; + } + + /** * @param \OC_Group_Backend $backend */ public function addBackend($backend) { diff --git a/lib/public/igroupmanager.php b/lib/public/igroupmanager.php index ffd459b09e1..ec4b03c5d18 100644 --- a/lib/public/igroupmanager.php +++ b/lib/public/igroupmanager.php @@ -41,6 +41,15 @@ namespace OCP; */ interface IGroupManager { /** + * Checks whether a given backend is used + * + * @param string $backendClass Full classname including complete namespace + * @return bool + * @since 8.1.0 + */ + public function isBackendUsed($backendClass); + + /** * @param \OCP\UserInterface $backend * @since 8.0.0 */ |