nextcloud/apps/files_sharing/lib
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
..
Activity fix(contacts): not contact, not local 2025-12-22 12:36:33 -01:00
AppInfo Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02:00
BackgroundJob chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
Collaboration chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
Command fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:52 +00:00
Config fix: default user_needs_share_refresh to true 2026-04-28 15:49:35 +02:00
Controller fix: don't put hashed password in share api response 2026-05-19 15:15:39 +00:00
Event feat(files_sharing): Support multiples users in UserShareAccessUpdatedEvent 2026-01-15 11:07:15 +01:00
Exceptions chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
External fix(files_sharing): respect config to skip certificate verification 2026-03-18 19:15:31 +01:00
Listener fix: skip owner when updating for added or removed share 2026-04-28 15:49:42 +02:00
Middleware chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
Migration feat(files_sharing): Add indexes for target on share and share_external 2026-01-16 08:32:14 +01:00
Notification chore: apply new CSFixer rules 2025-07-01 16:26:50 +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-28 15:49:39 +02:00
Settings fix(files_sharing): ensure share folder exists in the settings 2025-07-16 18:23:12 +02:00
ShareBackend chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
Cache.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
Capabilities.php feat(sharing): Make share permission in bundled edit configurable 2026-02-05 09:10:14 +00:00
DefaultPublicShareTemplateProvider.php fix: use canDownload for permissions on federated shares 2026-03-17 21:58:09 +00:00
DeleteOrphanedSharesJob.php chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
ExpireSharesJob.php chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
Helper.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02: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 chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
MountProvider.php Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02: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:19:58 +02:00
Scanner.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
SharedMount.php fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:52 +00:00
SharedStorage.php perf(s3): Expose pre-signed urls for S3 2025-12-09 11:21:35 +01:00
ShareRecipientUpdater.php fix: avoid checking share validity during mount updates 2026-04-28 15:49:43 +02:00
SharesReminderJob.php chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
ShareTargetValidator.php perf: only load a single mount at a time when checking for share conflicts 2026-04-28 15:49:39 +02:00
Updater.php fix: don't trigger moveShareInOrOutOfShare for reshares 2026-02-08 18:38:40 +00:00
ViewOnly.php fix(files_sharing): Switch back event path to be relative to user folder 2026-01-19 11:22:17 +01:00