nextcloud/tests
Anna Larch 6220ae9175 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-05-26 17:28:39 +02:00
..
apps chore: Add SPDX header 2024-05-13 17:41:36 +02:00
blueprints chore: split frontend building into legacy Vue 2 and Vue 3 2025-10-22 17:10:28 +02:00
Core feat(occ): make it possible to remove an arbitrary number of users to a group 2026-05-19 23:53:24 +02:00
data chore: remove always_populate_raw_post_data from setUploadLimit .user.ini 2026-05-19 21:39:51 +02:00
docker chore: Add SPDX header 2024-05-13 17:41:36 +02:00
lib fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-05-26 17:28:39 +02:00
autoload.php chore: Add an autoload.php file for tests relying on core class 2025-05-19 11:30:37 +02:00
bootstrap.php test: add env option to disable loading all installed apps during tests 2025-08-11 13:35:57 +02:00
databases-all-config.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
enable_all.php chore: Replace last calls to OC_App::enable by IAppManager 2025-08-18 17:09:39 +02:00
phpunit-autotest-external.xml ci: Migrate PHPUnit configs 2025-06-06 14:36:31 +02:00
phpunit-autotest.xml ci: Migrate PHPUnit configs 2025-06-06 14:36:31 +02:00
preseed-config.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
redis-cluster.config.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
redis.config.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
startsessionlistener.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00