| @@ 261-268 (lines=8) @@ | ||
| 258 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 259 | } |
|
| 260 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 261 | if (!empty($usersGroups)) { |
|
| 262 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 263 | // if the user is only in groups which are disabled for sharing then |
|
| 264 | // sharing is also disabled for the user |
|
| 265 | if (empty($remainingGroups)) { |
|
| 266 | return true; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | } |
|
| 270 | return false; |
|
| 271 | } |
|
| @@ 1234-1242 (lines=9) @@ | ||
| 1231 | } |
|
| 1232 | $user = $this->userManager->get($userId); |
|
| 1233 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1234 | if (!empty($usersGroups)) { |
|
| 1235 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
| 1236 | // if the user is only in groups which are disabled for sharing then |
|
| 1237 | // sharing is also disabled for the user |
|
| 1238 | if (empty($remainingGroups)) { |
|
| 1239 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
| 1240 | return true; |
|
| 1241 | } |
|
| 1242 | } |
|
| 1243 | } |
|
| 1244 | ||
| 1245 | $this->sharingDisabledForUsersCache[$userId] = false; |
|