| @@ 1250-1258 (lines=9) @@ | ||
| 1247 | } |
|
| 1248 | $user = $this->userManager->get($userId); |
|
| 1249 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1250 | if (!empty($usersGroups)) { |
|
| 1251 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1252 | // if the user is only in groups which are disabled for sharing then |
|
| 1253 | // sharing is also disabled for the user |
|
| 1254 | if (empty($remainingGroups)) { |
|
| 1255 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1256 | return true; |
|
| 1257 | } |
|
| 1258 | } |
|
| 1259 | } |
|
| 1260 | ||
| 1261 | $this->sharingDisabledForUsersCache[$userId] = false; |
|
| @@ 269-276 (lines=8) @@ | ||
| 266 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 267 | } |
|
| 268 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 269 | if (!empty($usersGroups)) { |
|
| 270 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 271 | // if the user is only in groups which are disabled for sharing then |
|
| 272 | // sharing is also disabled for the user |
|
| 273 | if (empty($remainingGroups)) { |
|
| 274 | return true; |
|
| 275 | } |
|
| 276 | } |
|
| 277 | } |
|
| 278 | return false; |
|
| 279 | } |
|