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
d551047b8a
fix: Fix PHP Warning foreach() argument must be of type array|object, null given
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-12 14:28:42 +02:00
Benjamin Gaussorgues
728644d647
Merge pull request #59731 from nextcloud/jtr/refactor-share-dry-exp-dat-validation
...
refactor(share): DRY up expiration date validation and fix dispatchEvent() log message
2026-06-11 11:42:06 +02:00
Benjamin Gaussorgues
2b7415ef4d
Merge pull request #60960 from nextcloud/carl/querybuilder-magic-number
...
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (master, main, 8.4, main, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, guests_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (master, main, 8.4, main, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / changes (push) Waiting to run
Psalm static code analysis / static-code-analysis (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-security (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ocp (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ncu (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-strict (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-summary (push) Blocked by required conditions
refactor: Use new IQueryBuilder::MAX_IN_PARAMETERS
2026-06-10 23:09:30 +02:00
Robin Appelman
6ca3556173
feat: delay fetching the display name of a share recipient untill we need it
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-09 12:01:40 +02:00
Carl Schwan
994565fec7
refactor: Use new IQueryBuilder::MAX_IN_PARAMETERS
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-03 13:45:29 +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
Carl Schwan
d470ad108f
fix: use correct variable for order by
...
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2026-05-07 19:16:46 +02:00
Carl Schwan
9ac556cdf5
perf(share): Remove useless order by id
...
This should improve a bit the performance in some particular cases
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-05-07 19:16:45 +02:00
Git'Fellow
3bbe0ee570
refactor: use strict operator
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-04-30 00:51:29 +02:00
Ferdinand Thiessen
27c7164e86
chore: add psalm-api to for classes we need to mock in unit tests
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 23:52:43 +02:00
Ferdinand Thiessen
e0ba4d71b6
chore: add missing Override attribute to OC
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:27 +02:00
Joas Schilling
aa904b255f
Merge pull request #59378 from nextcloud/carl/non-internal-api
...
chore: Replace MoveableMount usage with IMovableMount
2026-04-27 12:37:56 +02:00
Robin Appelman
a05a3b9005
fix: only update share for the user who moved the share
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:44 +02:00
Robin Appelman
e7fcb6c7f5
fix: handle share moves
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:38 +02:00
Carl Schwan
fbf84e6473
chore: Replace MoveableMount usage with IMovableMount
...
The former is private API while the IMovableMount is public.
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-04-24 10:14:37 +02:00
Josh
af076d5c05
refactor(share): extract shared expiration date validation
...
Both `validateExpirationDateInternal()` and `validateExpirationDateLink()` implemented the
same algorithm for:
- skipping validation when no expiration date is allowed
- rejecting past expiration dates
- applying a default expiration date for new shares
- enforcing the maximum allowed expiration date
- running the `verifyExpirationDate` hook
This change keeps the existing behavior but centralizes the logic so future fixes only need to be made in one place.
This commit also fixes a tiny unrelated quoting bug in `dispatchEvent()` that caused garbled error-log output in `dispatchEvent()`.
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-04-20 09:11:09 -04:00
Joas Schilling
0b2ad9a935
fix(sharing): Don't give a reason when share from disabled user is no longer working
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-04-13 08:50:31 +02:00
Ferdinand Thiessen
08495bfc0e
feat(share): provide canDownload getter on the share
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-03-17 17:01:58 +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
Andy Scherzinger
b729dc4ead
Merge pull request #58057 from nextcloud/carl/perf-delete-share
...
perf(sharing): Avoid loading all shares from all users when unsharing
2026-03-02 12:03:52 +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
2a81cba978
refactor(typing): Correct typing of IShareHelper
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-26 12:22:44 +01:00
Carl Schwan
4acb3b5da3
perf: Perform share path validation early
...
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-26 11:38:59 +01: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
2d20ee2e4e
fix(share): Set expiration time to end of day (23:59:59)
...
Shares now expire at the end of the selected day instead of the
beginning, allowing access throughout the entire expiration day.
Also return actual stored time in API response instead of hardcoded
00:00:00 to prevent timezone-related display issues in the UI.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-02-24 10:43:46 +01:00
Salvatore Martire
ed18c44374
fix: remove user part only at the beginning of path
...
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-02-20 16:35:37 +01:00
provokateurin
f12cecb684
feat(rector): Enable SafeDeclareStrictTypesRector
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-09 10:59:31 +01:00
Carl Schwan
c96ece0bcb
refactor: Add more typing
...
- repairs job
- database
- redis
And remove Helpertest which was unused outside of some tests.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:55:39 +01:00
Carl Schwan
7b6078875b
refactor: Run rector on lib/private
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
Louis Chmn
79c07d38aa
fix(files_sharing): Move path filtering to group share resolution
...
Previously, this was preventing users without a specific USERGROUP entry to see GROUP shares.
Signed-off-by: Louis Chmn <louis@chmn.me>
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-02-04 16:53:10 +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
Louis Chmn
b6e90acdb6
fix(DefaultSHareProvider): Specify join alias when accessing columns
...
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-01-16 08:32:14 +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
Louis Chmn
bba8e90c62
fix(files_sharing): Unify getSharedWithByPath and getSharedWith
...
Follow-up of https://github.com/nextcloud/server/pull/57285
This ensure that the behavior is the same and reduce code duplication.
Salvatore's version seems to be more optimized, but I prefer those change to be done separately and for both methods.
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-01-15 10:22:44 +01:00
Salvatore Martire
a449af6460
feat: introduce API for partial share providers
...
Adds support for retrieval of shares by path
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2025-12-30 16:43:09 +01:00
Robin Appelman
c614a13d4b
Merge pull request #57158 from nextcloud/users-for-share
...
feat: add api to get users for share
2025-12-30 14:24:10 +01:00
Andy Scherzinger
32327c6285
Merge pull request #56773 from nextcloud/carl/remove-sciencemesh
...
refactor(share): Remove code related to science mesh integration
2025-12-30 14:18:53 +01:00
Robin Appelman
bbabf50984
feat: add api to get users for share
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-12-22 15:34:23 +01:00
Julius Knorr
7d5ffa50ae
feat: Allow to block full matches on the display name
...
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-12-18 14:04:46 +00:00
Carl Schwan
a011cb7780
refactor: Rename some variables in external share's manager
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 10:14:40 +01:00
Carl Schwan
3183ea79d2
refactor(external-share): Port more code to string as type for the id
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-16 10:40:09 +01:00
Carl Schwan
3bdb344224
perf(external-sharing): Port to Entity and SnowflakeId
...
This removes all the read after write and we don't need to queries all
the time the same share in the same request anymore.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-16 10:40:07 +01:00
Côme Chilliet
3e8502d239
fix(shares): Fix infinite loop when hide_disabled_user_shares is yes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-15 17:02:52 +01:00
Julius Knorr
a45f4b0cdc
fix: Fix setting name inconsistency between backend and frontend
...
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-12-12 13:08:34 +01:00
Carl Schwan
8bbd30693c
refactor(share-manager): Make return type more precise
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-04 21:39:25 +01:00
Louis
5bf67fd206
Merge pull request #56745 from nextcloud/artonge/feat/files_sharing/support_priority_in_template_providers
...
feat(files_sharing): Support priority in public template providers
2025-12-04 12:58:44 +01:00
Louis Chmn
10b82c8bf8
feat(files_sharing): Support priority in public template providers
...
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-12-04 10:59:58 +01:00