| @@ 1237-1245 (lines=9) @@ | ||
| 1234 | } |
|
| 1235 | $user = $this->userManager->get($userId); |
|
| 1236 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1237 | if (!empty($usersGroups)) { |
|
| 1238 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1239 | // if the user is only in groups which are disabled for sharing then |
|
| 1240 | // sharing is also disabled for the user |
|
| 1241 | if (empty($remainingGroups)) { |
|
| 1242 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1243 | return true; |
|
| 1244 | } |
|
| 1245 | } |
|
| 1246 | } |
|
| 1247 | ||
| 1248 | $this->sharingDisabledForUsersCache[$userId] = false; |
|
| @@ 263-270 (lines=8) @@ | ||
| 260 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 261 | } |
|
| 262 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 263 | if (!empty($usersGroups)) { |
|
| 264 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 265 | // if the user is only in groups which are disabled for sharing then |
|
| 266 | // sharing is also disabled for the user |
|
| 267 | if (empty($remainingGroups)) { |
|
| 268 | return true; |
|
| 269 | } |
|
| 270 | } |
|
| 271 | } |
|
| 272 | return false; |
|
| 273 | } |
|