nextcloud/apps/files_sharing/tests
Anna Larch 85202d7f4e fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares
When an ownCloud-migrated group share (which has no per-user USERGROUP
subshare) is renamed for the first time, DefaultShareProvider::move()
inserted a new USERGROUP row without setting `accepted`. The column
defaulted to 0 (STATUS_PENDING), causing MountProvider to skip the
share on the next login — the shared file disappeared for the recipient.

Fix: set accepted = STATUS_ACCEPTED explicitly on the INSERT in
DefaultShareProvider::move() for the TYPE_GROUP branch.

Secondary fix: SharedMount::moveMount() silently returned true when
updateFileTarget() threw (e.g. group no longer exists on an OC-migrated
instance). Set $result = false in the catch block so View::rename()
propagates the failure instead of silently corrupting VFS state.

An opt-in occ command (sharing:fix-owncloud-group-shares) with --dry-run
support is included to repair existing broken instances. It targets only
TYPE_USERGROUP subshares with accepted=STATUS_PENDING and permissions!=0
(shares that were accepted but broken by the missing column default),
leaving explicitly declined shares (permissions=0) untouched.

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-06-02 09:14:52 +00:00
..
Collaboration fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
Command fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:52 +00:00
Controller test: adjust tests redacted password field 2026-05-19 15:15:39 +00:00
External fix(files_sharing): respect config to skip certificate verification 2026-03-18 19:15:31 +01:00
Listener test: add test for UserHomeSetupListener 2026-04-28 15:49:35 +02:00
Middleware fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
Migration fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
Repair Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02:00
ApiTest.php Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02:00
ApplicationTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
CacheTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
CapabilitiesTest.php perf(sharing): Avoid loading all shares from all users when unsharing 2026-03-02 11:25:49 +00:00
DeleteOrphanedSharesJobTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
EncryptedSizePropagationTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
EtagPropagationTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
ExpireSharesJobTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
ExternalStorageTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
GroupEtagPropagationTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
HelperTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
LockingTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
MountProviderTest.php test: adjust tests 2026-01-27 17:26:59 +01:00
PropagationTestCase.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
SharedMountTest.php fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:52 +00:00
SharedStorageTest.php Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02:00
ShareRecipientUpdaterTest.php fix: properly remove mount with moved child-shares 2026-04-28 15:49:42 +02:00
SharesReminderJobTest.php test(share): Update expiration date tests for end-of-day time 2026-02-24 10:23:09 +00:00
SharesUpdatedListenerTest.php fix: don't trigger on-setup share update from inside the share listener 2026-04-28 15:49:37 +02:00
ShareTargetValidatorTest.php perf: only load a single mount at a time when checking for share conflicts 2026-04-28 15:49:39 +02:00
ShareTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
SizePropagationTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
TestCase.php Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02:00
UnshareChildrenTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
UpdaterTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00
WatcherTest.php fix(psalm): Fix static analysis issues in apps/*/tests 2026-01-16 12:00:51 +01:00