Commit graph

1080 commits

Author SHA1 Message Date
Salvatore Martire
53d48d6f29 fix: track time spent in recursive markOrRun calls
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-06-22 13:05:25 +02:00
Enrique Pérez Arnaud
3616212ba2
feat(files_sharing): store and refresh OCM access tokens for external shares
Co-authored-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
2026-06-17 11:01:16 +02:00
Côme Chilliet
805902eed3
chore: Re-enable tests failing on drone
We do not use drone anymore, let’s see if we can fix these tests or if
 they should be removed.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-11 09:45:29 +02:00
Robin Appelman
2ee8f5c374 test: improve setup in share propagation tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-08 15:37:26 +02:00
Robin Appelman
7db238319f test: more group/user test trait usage and setup/teardown improvements
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-08 15:37:24 +02:00
Robin Appelman
10e636f61c test: use dummy users in SharesReminderJobTest
saves ~5s

Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-08 15:35:07 +02:00
Robin Appelman
d47fd8d708 test: mock ocm discovery in external share test
saves ~50s while running tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-08 15:35:07 +02:00
Carl Schwan
b7ee8e7545
Merge pull request #59813 from nextcloud/fix/noid/fix-owncloud-group-share-rename
fix(sharing): set STATUS_ACCEPTED when creating USERGROUP subshare on…
2026-06-02 11:14:13 +02:00
Côme Chilliet
1ab09ec753
chore: Apply new coding standard to all files
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-01 13:46:39 +02:00
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
Robin Appelman
b2494f224f
test: adjust tests redacted password field
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-05-19 16:04:42 +02:00
nextcloud-command
e11e7f1c70
refactor: Apply rector changes
Signed-off-by: GitHub <noreply@github.com>
2026-04-29 23:54:19 +02:00
Robin Appelman
987a193a56
fix: properly remove mount with moved child-shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:45 +02:00
Robin Appelman
41e6124dcc
perf: only load a single mount at a time when checking for share conflicts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:43 +02:00
Robin Appelman
cb8fb349d2
fix: don't trigger on-setup share update from inside the share listener
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:42 +02:00
Robin Appelman
1aa347dc76
fix: check share target parent in userfolders mount
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:41 +02:00
Robin Appelman
a1b4a6b6b7
fix: log when user is marked as needing share mount refresh
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:40 +02:00
Robin Appelman
940a68649a
test: add test for UserHomeSetupListener
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:40 +02:00
Robin Appelman
9853bc880d
fix: improve performance of handling delete shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:16:43 +02:00
Robin Appelman
9c399ba4ac
feat: use time-based cutoff for share updating instead of count
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:16:42 +02:00
Robin Appelman
b57959d5d2
test: add some tests for ShareRecipientUpdaterTest
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 14:39:54 +02:00
Robin Appelman
8680d4446b
test: add some tests for SharesUpdatedListenerTest
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 14:39:53 +02:00
Robin Appelman
8de080580b
fix: disable share resolve postpone in tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 14:39:51 +02:00
Ferdinand Thiessen
e0c1b74419
test: resolve PHPUnit deprecation warning about addMethods
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-01 01:12:52 +02:00
Kate
810caa3e4a
Merge pull request #58593 from nextcloud/carl/share-spring-cleaning 2026-03-10 15:01:50 +01:00
Côme Chilliet
c98244a79e
Merge pull request #58827 from nextcloud/fix/fix-fileinfo-path
fix(files): Fix FileInfo['path'] situation
2026-03-10 15:01:17 +01:00
Côme Chilliet
17ef1dbec9
Merge pull request #58808 from nextcloud/carl/remove-many-get-server
refactor: remove long deprecated IServerContainer methods
2026-03-10 15:00:48 +01:00
Côme Chilliet
842b3f9e0a
fix(files): Fix FileInfo['path'] situation
Previously $fileInfo->getPath() and $fileInfo['path'] would return
 different things. The [] version was not consistent, being sometimes
 relative and sometimes kind of absolute, and sometimes plenty wrong
 (like when used from occ commands, because there is no user in
 session).
So this is always returning absolute now.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-03-10 11:56:31 +01:00
Carl Schwan
39c14c383b
refactor: remove long deprecated IServerContainer methods
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-03-10 10:36:35 +01:00
Carl Schwan
af94028bdb
refactor: Remove old Share backend
This has been implicitely deprecated for a while with Share20 containing
the new implementation.

The only use was to determine whether remote sharing was enabled or not,
which we can do much more easily.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-03-10 10:09:40 +01:00
Kate
7ae8aebab3
Merge pull request #58724 from nextcloud/fix/respect-skipping-certificate-verify
fix(files_sharing): respect config to skip certificate verification
2026-03-09 23:08:34 +01:00
Salvatore Martire
8b235c8f49 fix(files_sharing): respect config to skip certificate verification
This is important especially for local development, as certificate are
self-signed.

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-03-09 18:21:15 +01:00
Côme Chilliet
8aedcb4a82
Merge pull request #58652 from nextcloud/automated/noid/rector-changes
Apply rector changes
2026-03-05 16:03:50 +01:00
nextcloud-command
663018455e refactor: Apply rector changes
Signed-off-by: GitHub <noreply@github.com>
2026-03-01 14:43:11 +00:00
Carl Schwan
0676fba514
perf(sharing): Avoid loading all shares from all users when unsharing
First check which users have a shares and for which providers and then
only load these shares.

Avoid doing at most 5 SQL queries for each users a share was shared with if
there are no shares.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-25 17:14:15 +01:00
nfebe
ce0d97b6e5 test(share): Update expiration date tests for end-of-day time
Update expected values in ManagerTest to reflect the new behavior
where share expiration dates are set to 23:59:59 instead of 00:00:00.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-02-24 10:43:46 +01:00
Ferdinand Thiessen
a63e248b39
fix(files_sharing): make legacy downloadShare endpoint compatible with legacy behavior
This needs to be able to directly download files if specified to only
download a single file and not a folder.
Also it was possible to either pass a files array json encoded or a
single file not encoded at all.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-20 15:57:56 +01:00
Robin Appelman
a3cc9754f8
feat: improve VerifyMountPointEvent event
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-09 18:42:30 +01:00
Carl Schwan
acda4ff072
fix(ShareAPIControllerTest): Fix return types of DateTimeZone
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:47 +01:00
Cristian Scheid
265abc3b91 test(files_sharing): update ShareesAPIController mock to include FederatedShareProvider dependency
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
2026-02-05 08:22:13 -03:00
Andy Scherzinger
a08aec2dbd
Merge pull request #57881 from nextcloud/share-target-repair
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (master, 8.4, main, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, 8.4, main, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Has been cancelled
Psalm static code analysis / static-code-analysis-security (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ocp (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ncu (push) Has been cancelled
Psalm static code analysis / static-code-analysis-strict (push) Has been cancelled
Add repair step for share targets with excess (2)
2026-01-29 19:33:13 +01:00
Robin Appelman
5d0acf80dd
test: add test for share target repair
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-29 18:19:18 +01:00
Carl Schwan
ef226e9ec6
Merge pull request #57826 from nextcloud/carl/setupmanager
feat(OCP): Expose setup manager to OCP
2026-01-28 21:39:15 +01:00
Carl Schwan
ae73f7aaf5
refactor(setup-manager): Use ISetupManager instead of SetupManager
Keep using the OC API in the mount manager and OC_Utils, but the rest is
now using the public API.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-27 15:19:19 +01:00
Carl Schwan
c8989d853c
refactor(IShare): Add typing for node
This might also improve a bit the performance.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-27 11:19:33 +01:00
Robin Appelman
d71c6796ca
feat: perform share mount validation on share instead of on mount
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-21 16:35:53 +01:00
Benjamin Gaussorgues
0ff9de1a06
Merge pull request #57404 from nextcloud/carl/fix-psalm-tests1 2026-01-16 14:09:36 +01:00
Carl Schwan
11cf69d8ba
fix(psalm): Fix static analysis issues in apps/*/tests
There are still 1200 more to fix before we can enable static analysis
for the tests.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-16 12:00:51 +01:00
Louis Chmn
7c9c74f4f0 feat(files_sharing): Implement partial mount providers
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-01-16 08:32:14 +01:00
Carl Schwan
0b8eae7789
perf(files): Optimize CacheEntry creation
Avoid many copy on writes and create array only once.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-15 11:47:41 +01:00