diff options
author | Corentin Damman <c.damman@intopix.com> | 2022-09-16 17:43:01 +0200 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-03-15 16:52:59 +0100 |
commit | 0fa9f3049f20ee4d573a6c615ebf9e7ecf7abdd1 (patch) | |
tree | 29110a4f03ce26db4419817aec2b2e996b22bd27 /tests/lib | |
parent | a0913739c68d9c4263fc0a9fa7e58f4276458f45 (diff) | |
download | nextcloud-server-0fa9f3049f20ee4d573a6c615ebf9e7ecf7abdd1.tar.gz nextcloud-server-0fa9f3049f20ee4d573a6c615ebf9e7ecf7abdd1.zip |
feat(files_sharing): allow to specify allowed groups to share instead of excluded groups
Relates to #3387
Signed-off-by: Corentin Damman <c.damman@intopix.com>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index d787556eb64..dc122826ef9 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -2099,26 +2099,33 @@ class ManagerTest extends \Test\TestCase { // No exclude groups $data[] = ['no', null, null, [], false]; - // empty exclude list, user no groups + // empty exclude / allow list, user no groups $data[] = ['yes', '', json_encode(['']), [], false]; + $data[] = ['allow', '', json_encode(['']), [], true]; - // empty exclude list, user groups + // empty exclude / allow list, user groups $data[] = ['yes', '', json_encode(['']), ['group1', 'group2'], false]; + $data[] = ['allow', '', json_encode(['']), ['group1', 'group2'], true]; // Convert old list to json $data[] = ['yes', 'group1,group2', json_encode(['group1', 'group2']), [], false]; + $data[] = ['allow', 'group1,group2', json_encode(['group1', 'group2']), [], true]; // Old list partly groups in common $data[] = ['yes', 'group1,group2', json_encode(['group1', 'group2']), ['group1', 'group3'], false]; + $data[] = ['allow', 'group1,group2', json_encode(['group1', 'group2']), ['group1', 'group3'], false]; // Old list only groups in common $data[] = ['yes', 'group1,group2', json_encode(['group1', 'group2']), ['group1'], true]; + $data[] = ['allow', 'group1,group2', json_encode(['group1', 'group2']), ['group1'], false]; // New list partly in common $data[] = ['yes', json_encode(['group1', 'group2']), null, ['group1', 'group3'], false]; + $data[] = ['allow', json_encode(['group1', 'group2']), null, ['group1', 'group3'], false]; // New list only groups in common $data[] = ['yes', json_encode(['group1', 'group2']), null, ['group2'], true]; + $data[] = ['allow', json_encode(['group1', 'group2']), null, ['group2'], false]; return $data; } |