| @@ 343-350 (lines=8) @@ | ||
| 340 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 341 | } |
|
| 342 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 343 | if (!empty($usersGroups)) { |
|
| 344 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 345 | // if the user is only in groups which are disabled for sharing then |
|
| 346 | // sharing is also disabled for the user |
|
| 347 | if (empty($remainingGroups)) { |
|
| 348 | return true; |
|
| 349 | } |
|
| 350 | } |
|
| 351 | } |
|
| 352 | return false; |
|
| 353 | } |
|
| @@ 1584-1592 (lines=9) @@ | ||
| 1581 | } |
|
| 1582 | $user = $this->userManager->get($userId); |
|
| 1583 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1584 | if (!empty($usersGroups)) { |
|
| 1585 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1586 | // if the user is only in groups which are disabled for sharing then |
|
| 1587 | // sharing is also disabled for the user |
|
| 1588 | if (empty($remainingGroups)) { |
|
| 1589 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1590 | return true; |
|
| 1591 | } |
|
| 1592 | } |
|
| 1593 | } |
|
| 1594 | ||
| 1595 | $this->sharingDisabledForUsersCache[$userId] = false; |
|