| @@ 261-268 (lines=8) @@ | ||
| 258 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 259 | } |
|
| 260 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 261 | if (!empty($usersGroups)) { |
|
| 262 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 263 | // if the user is only in groups which are disabled for sharing then |
|
| 264 | // sharing is also disabled for the user |
|
| 265 | if (empty($remainingGroups)) { |
|
| 266 | return true; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | } |
|
| 270 | return false; |
|
| 271 | } |
|
| @@ 1222-1229 (lines=8) @@ | ||
| 1219 | } |
|
| 1220 | $user = $this->userManager->get($userId); |
|
| 1221 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1222 | if (!empty($usersGroups)) { |
|
| 1223 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1224 | // if the user is only in groups which are disabled for sharing then |
|
| 1225 | // sharing is also disabled for the user |
|
| 1226 | if (empty($remainingGroups)) { |
|
| 1227 | return true; |
|
| 1228 | } |
|
| 1229 | } |
|
| 1230 | } |
|
| 1231 | return false; |
|
| 1232 | } |
|