| @@ 342-349 (lines=8) @@ | ||
| 339 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 340 | } |
|
| 341 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 342 | if (!empty($usersGroups)) { |
|
| 343 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 344 | // if the user is only in groups which are disabled for sharing then |
|
| 345 | // sharing is also disabled for the user |
|
| 346 | if (empty($remainingGroups)) { |
|
| 347 | return true; |
|
| 348 | } |
|
| 349 | } |
|
| 350 | } |
|
| 351 | return false; |
|
| 352 | } |
|
| @@ 1560-1568 (lines=9) @@ | ||
| 1557 | } |
|
| 1558 | $user = $this->userManager->get($userId); |
|
| 1559 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1560 | if (!empty($usersGroups)) { |
|
| 1561 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1562 | // if the user is only in groups which are disabled for sharing then |
|
| 1563 | // sharing is also disabled for the user |
|
| 1564 | if (empty($remainingGroups)) { |
|
| 1565 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1566 | return true; |
|
| 1567 | } |
|
| 1568 | } |
|
| 1569 | } |
|
| 1570 | ||
| 1571 | $this->sharingDisabledForUsersCache[$userId] = false; |
|