| @@ 325-332 (lines=8) @@ | ||
| 322 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 323 | } |
|
| 324 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 325 | if (!empty($usersGroups)) { |
|
| 326 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 327 | // if the user is only in groups which are disabled for sharing then |
|
| 328 | // sharing is also disabled for the user |
|
| 329 | if (empty($remainingGroups)) { |
|
| 330 | return true; |
|
| 331 | } |
|
| 332 | } |
|
| 333 | } |
|
| 334 | return false; |
|
| 335 | } |
|
| @@ 1521-1529 (lines=9) @@ | ||
| 1518 | } |
|
| 1519 | $user = $this->userManager->get($userId); |
|
| 1520 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1521 | if (!empty($usersGroups)) { |
|
| 1522 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1523 | // if the user is only in groups which are disabled for sharing then |
|
| 1524 | // sharing is also disabled for the user |
|
| 1525 | if (empty($remainingGroups)) { |
|
| 1526 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1527 | return true; |
|
| 1528 | } |
|
| 1529 | } |
|
| 1530 | } |
|
| 1531 | ||
| 1532 | $this->sharingDisabledForUsersCache[$userId] = false; |
|