| @@ 271-278 (lines=8) @@ | ||
| 268 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 269 | } |
|
| 270 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 271 | if (!empty($usersGroups)) { |
|
| 272 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 273 | // if the user is only in groups which are disabled for sharing then |
|
| 274 | // sharing is also disabled for the user |
|
| 275 | if (empty($remainingGroups)) { |
|
| 276 | return true; |
|
| 277 | } |
|
| 278 | } |
|
| 279 | } |
|
| 280 | return false; |
|
| 281 | } |
|
| @@ 1322-1330 (lines=9) @@ | ||
| 1319 | } |
|
| 1320 | $user = $this->userManager->get($userId); |
|
| 1321 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1322 | if (!empty($usersGroups)) { |
|
| 1323 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1324 | // if the user is only in groups which are disabled for sharing then |
|
| 1325 | // sharing is also disabled for the user |
|
| 1326 | if (empty($remainingGroups)) { |
|
| 1327 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1328 | return true; |
|
| 1329 | } |
|
| 1330 | } |
|
| 1331 | } |
|
| 1332 | ||
| 1333 | $this->sharingDisabledForUsersCache[$userId] = false; |
|