| @@ 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 | } |
|
| @@ 1311-1319 (lines=9) @@ | ||
| 1308 | } |
|
| 1309 | $user = $this->userManager->get($userId); |
|
| 1310 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1311 | if (!empty($usersGroups)) { |
|
| 1312 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1313 | // if the user is only in groups which are disabled for sharing then |
|
| 1314 | // sharing is also disabled for the user |
|
| 1315 | if (empty($remainingGroups)) { |
|
| 1316 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1317 | return true; |
|
| 1318 | } |
|
| 1319 | } |
|
| 1320 | } |
|
| 1321 | ||
| 1322 | $this->sharingDisabledForUsersCache[$userId] = false; |
|