@@ 333-340 (lines=8) @@ | ||
330 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
331 | } |
|
332 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
333 | if (!empty($usersGroups)) { |
|
334 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
335 | // if the user is only in groups which are disabled for sharing then |
|
336 | // sharing is also disabled for the user |
|
337 | if (empty($remainingGroups)) { |
|
338 | return true; |
|
339 | } |
|
340 | } |
|
341 | } |
|
342 | return false; |
|
343 | } |
@@ 1306-1314 (lines=9) @@ | ||
1303 | } |
|
1304 | $user = $this->userManager->get($userId); |
|
1305 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
1306 | if (!empty($usersGroups)) { |
|
1307 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|
1308 | // if the user is only in groups which are disabled for sharing then |
|
1309 | // sharing is also disabled for the user |
|
1310 | if (empty($remainingGroups)) { |
|
1311 | $this->sharingDisabledForUsersCache[$userId] = true; |
|
1312 | return true; |
|
1313 | } |
|
1314 | } |
|
1315 | } |
|
1316 | ||
1317 | $this->sharingDisabledForUsersCache[$userId] = false; |