File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
apps/provisioning_api/lib/Controller Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ public function getGroup(string $groupId): DataResponse {
133133 }
134134
135135 /**
136+ * @NoSubAdminRequired
137+ *
136138 * Get a list of users in the specified group
137139 *
138140 * @param string $groupId ID of the group
@@ -154,14 +156,15 @@ public function getGroupUsers(string $groupId): DataResponse {
154156 $ group = $ this ->groupManager ->get ($ groupId );
155157 if ($ group !== null ) {
156158 $ isSubadminOfGroup = $ this ->groupManager ->getSubAdmin ()->isSubAdminOfGroup ($ user , $ group );
159+ $ isMember = $ this ->groupManager ->isInGroup ($ user ->getUID (), $ group ->getGID ());
157160 } else {
158161 throw new OCSNotFoundException ('The requested group could not be found ' );
159162 }
160163
161164 // Check subadmin has access to this group
162165 $ isAdmin = $ this ->groupManager ->isAdmin ($ user ->getUID ());
163166 $ isDelegatedAdmin = $ this ->groupManager ->isDelegatedAdmin ($ user ->getUID ());
164- if ($ isAdmin || $ isDelegatedAdmin || $ isSubadminOfGroup ) {
167+ if ($ isAdmin || $ isDelegatedAdmin || $ isSubadminOfGroup || $ isMember ) {
165168 $ users = $ this ->groupManager ->get ($ groupId )->getUsers ();
166169 $ users = array_map (function ($ user ) {
167170 /** @var IUser $user */
You can’t perform that action at this time.
0 commit comments