nextcloud/lib/private/Share20
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
..
Exception chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
DefaultShareProvider.php fix(sharing): restore STATUS_ACCEPTED for OC-migrated group share subshares 2026-06-02 09:14:52 +00:00
GroupDeletedListener.php fix(Share20): Convert broken hooks to IEventListener 2025-03-03 12:49:01 +01:00
LegacyHooks.php fix(IShare): Add missing getParent and setParent methods 2025-07-29 11:27:04 +02:00
Manager.php fix: only update share for the user who moved the share 2026-04-28 15:49:41 +02:00
ProviderFactory.php refactor(share): Remove code related to science mesh integration 2025-12-03 14:11:58 +01:00
PublicShareTemplateFactory.php feat(files_sharing): Support priority in public template providers 2025-12-04 10:59:58 +01:00
Share.php Revert "[stable33] Revert "Stable33 authoritative share"" 2026-04-28 15:49:33 +02:00
ShareAttributes.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ShareDisableChecker.php fix(sharing): fix json decoding the list of groups excluded from sharing 2025-06-16 08:30:31 +02:00
ShareHelper.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
UserDeletedListener.php fix(Share20): Convert broken hooks to IEventListener 2025-03-03 12:49:01 +01:00
UserRemovedListener.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00