aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group/Group.php
diff options
context:
space:
mode:
authorJohannes Leuker <j.leuker@hosting.de>2021-02-09 14:50:38 +0100
committerJohannes Leuker <j.leuker@hosting.de>2021-03-01 16:02:08 +0100
commit2796ef80ff53684c6b276b054bb2d3b6039a4ef6 (patch)
tree29336019d1ad40fedae19f39ca67da5455ae2266 /lib/private/Group/Group.php
parent9fd72b0d3a4ebfad2291a18aefc51e999fbb0744 (diff)
downloadnextcloud-server-2796ef80ff53684c6b276b054bb2d3b6039a4ef6.tar.gz
nextcloud-server-2796ef80ff53684c6b276b054bb2d3b6039a4ef6.zip
Show group backends in occ group:list --info and group:info
Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
Diffstat (limited to 'lib/private/Group/Group.php')
-rw-r--r--lib/private/Group/Group.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php
index d3f8c603121..bb9a65de012 100644
--- a/lib/private/Group/Group.php
+++ b/lib/private/Group/Group.php
@@ -36,6 +36,7 @@ use OC\Hooks\PublicEmitter;
use OCP\Group\Backend\ICountDisabledInGroup;
use OCP\Group\Backend\IGetDisplayNameBackend;
use OCP\Group\Backend\IHideFromCollaborationBackend;
+use OCP\Group\Backend\INamedBackend;
use OCP\Group\Backend\ISetDisplayNameBackend;
use OCP\GroupInterface;
use OCP\IGroup;
@@ -318,6 +319,24 @@ class Group implements IGroup {
}
/**
+ * Get the names of the backend classes the group is connected to
+ *
+ * @return string[]
+ */
+ public function getBackendNames() {
+ $backends = [];
+ foreach ($this->backends as $backend) {
+ if ($backend instanceof INamedBackend) {
+ $backends[] = $backend->getBackendName();
+ } else {
+ $backends[] = get_class($backend);
+ }
+ }
+
+ return $backends;
+ }
+
+ /**
* delete the group
*
* @return bool