From 4db16fb8afd6f317b2439193210e5cebc69fd05d Mon Sep 17 00:00:00 2001 From: jld3103 Date: Tue, 28 Mar 2023 16:09:47 +0200 Subject: [PATCH] Add missing methods to OCP\IGroupManager Signed-off-by: jld3103 --- apps/provisioning_api/lib/Controller/AUserData.php | 2 +- lib/private/Group/Manager.php | 2 +- lib/public/IGroupManager.php | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index bbb3abe3c24ac..672be0d176ab3 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -66,7 +66,7 @@ abstract class AUserData extends OCSController { protected $userManager; /** @var IConfig */ protected $config; - /** @var IGroupManager|Manager */ // FIXME Requires a method that is not on the interface + /** @var IGroupManager|Manager */ protected $groupManager; /** @var IUserSession */ protected $userSession; diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php index b718afa516828..8052987824b1f 100644 --- a/lib/private/Group/Manager.php +++ b/lib/private/Group/Manager.php @@ -418,7 +418,7 @@ public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0 /** * @return \OC\SubAdmin */ - public function getSubAdmin() { + public function getSubAdmin(): \OC\SubAdmin { if (!$this->subAdmin) { $this->subAdmin = new \OC\SubAdmin( $this->userManager, diff --git a/lib/public/IGroupManager.php b/lib/public/IGroupManager.php index 2e2685eeeb4ef..bb28bcd1065b3 100644 --- a/lib/public/IGroupManager.php +++ b/lib/public/IGroupManager.php @@ -155,4 +155,13 @@ public function isInGroup($userId, $group); * @since 26.0.0 */ public function getDisplayName(string $groupId): ?string; + + /** + * Get the subadmin of a Nextcloud group + * + * @return \OCP\Group\ISubAdmin + * + * @since 27.0.0 + */ + public function getSubAdmin(): \OCP\Group\ISubAdmin; }