nextcloud/apps/files_sharing/lib
Anna Larch 9af4a2bb5a 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:34 +00:00
..
Activity fix(files_sharing): Use UnknownActivityException 2026-05-19 12:39:05 +00:00
AppInfo chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
BackgroundJob chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Collaboration chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Command fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:34 +00:00
Config chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Controller fix: don't put hashed password in share api response 2026-05-19 15:15:22 +00:00
Event feat(files_sharing): Support multiples users in UserShareAccessUpdatedEvent 2026-01-15 11:07:15 +01:00
Exceptions feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
External chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Listener refactor: Apply rector changes 2026-04-29 23:54:19 +02:00
Middleware chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Migration chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Notification chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
OpenMetrics feat(files_sharing): add basic OpenMetrics exporter for files shares 2026-01-07 09:38:13 +01:00
Repair perf: only load a single mount at a time when checking for share conflicts 2026-04-24 18:17:43 +02:00
Settings chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Cache.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Capabilities.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
DefaultPublicShareTemplateProvider.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
DeleteOrphanedSharesJob.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
ExpireSharesJob.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
Helper.php refactor: Remove old Share backend 2026-03-10 10:09:40 +01:00
Hooks.php fix(sharing): Adapt Hooks to new API 2025-12-16 10:38:30 +01:00
ISharedMountPoint.php chore: Add SPDX header 2024-06-06 22:53:41 +02:00
ISharedStorage.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
MountProvider.php feat: implement authoritative mount provider for share provider 2026-02-13 19:02:05 +01:00
OrphanHelper.php Merge pull request #55252 from nextcloud/chore/chunked_orphan_delete 2026-01-08 09:50:09 +01:00
ResponseDefinitions.php chore: psalm fixes 2026-04-21 18:18:50 +02:00
Scanner.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
SharedMount.php fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:34 +00:00
SharedStorage.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
ShareRecipientUpdater.php fix: avoid checking share validity during mount updates 2026-04-24 18:17:45 +02:00
SharesReminderJob.php chore: add missing Override attribute to app code 2026-04-28 21:29:28 +02:00
ShareTargetValidator.php perf: only load a single mount at a time when checking for share conflicts 2026-04-24 18:17:43 +02:00
Updater.php fix: don't trigger moveShareInOrOutOfShare for reshares 2026-02-06 15:41:49 +01:00
ViewOnly.php fix(files_sharing): Switch back event path to be relative to user folder 2026-01-19 11:22:17 +01:00