Commit graph

527 commits

Author SHA1 Message Date
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
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
Carl Schwan
cc7655136c
refactor(share): Remove code related to science mesh integration
The app was not updated for the past 2 years.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-03 14:11:58 +01:00
nfebe
6bccaf778a fix(sharing): Allow public share access for everyone
When a logged-in user accesses a public share link in the same browser,
the system was incorrectly checking if that user's groups were excluded
from creating link shares. This caused share not found errors for users
in excluded groups, even though public shares should be accessible to anyone
with the link.

The group exclusion setting (`shareapi_allow_links_exclude_groups`) is
intended to restrict share creation, not share access. Public shares
are meant to be anonymous and accessible regardless of the viewer identity
or group membership.

We now check the exclusion for the share creator and not the viewer.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-12-02 09:45:18 +01:00
Ferdinand Thiessen
774aad3ab1 feat(Share\IManager): add matchUserId method and update docs
Add missing `matchUserId` method for full-match-autocomplete options
and update docs to make it clearer what each options exactly means.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-26 18:26:37 +02:00
Andy Scherzinger
bd6c16ea88
Merge pull request #53503 from nextcloud/fix-json-decoding-groups-excluded-from-share
fix(sharing): fix json decoding the list of groups excluded from sharing
2025-08-24 21:38:31 +02:00
Maxence Lange
66cc7b731a
Merge pull request #54408 from nextcloud/feat/noid/preset-on-share-link-expire-date
feat(preset): share link expiration date
2025-08-19 10:24:43 -01:00
Andy Scherzinger
c026c7c933
Merge pull request #54419 from nextcloud/share-event-catch
fix: catch and log exception from share events
2025-08-19 07:21:52 +02:00
Maxence Lange
6076b67696 feat(preset): share link expiration date
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2025-08-14 16:07:32 -01:00
Robin Appelman
dcc6c1956a fix: catch and log exception from share events
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-14 11:37:11 +02:00
Maxence Lange
cb84ccc57d feat(preset): share password protection
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2025-08-12 14:37:32 -01:00
Daniel
b8ad6d091a
Merge pull request #53945 from nextcloud/chore/share-constants
chore(OC\Share\Constants): Remove unused SHARE_TYPE_* constants
2025-07-29 13:31:42 +02:00
Kate
49618b30a7
Merge pull request #53946 from nextcloud/chore/remove-hierarchical-shares 2025-07-29 13:26:03 +02:00
Maxence Lange
51dc9f89b7
Merge pull request #54064 from nextcloud/feat/preset/custom-share-token
feat(preset): add lexicon entry for custom share tokens
2025-07-29 10:11:05 -01:00
provokateurin
746e5917c7
fix(IShare): Add missing getParent and setParent methods
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 11:27:04 +02:00
Maxence Lange
3ceffe9f5b feat(preset): add lexicon entry for custom share token
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2025-07-29 08:15:08 -01:00
Kate
89d659ca17
Merge pull request #51602 from nextcloud/fix/fix-default-share-folder-for-group-shares 2025-07-29 11:12:58 +02:00
provokateurin
3c7fce39aa
chore(OC\Share\Constants): Remove unused SHARE_TYPE_* constants
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 10:39:33 +02:00
provokateurin
665a38573c
fix(IShareProvider): Add missing getChildren method to the interface
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 10:26:33 +02:00
provokateurin
5bd626bd40
chore: Fix all method calls with too many arguments
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-22 12:34:49 +02:00
Côme Chilliet
12ceeacb0e
fix: Use default share folder of the user on share accept
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-08 13:24:37 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
skjnldsv
9806a9830c feat(files_sharing): allow viewing files with download disabled
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-06-26 11:47:53 +02:00
Thomas Citharel
e2195a2f6d
fix(sharing): fix json decoding the list of groups excluded from sharing
json_decode() returns stdclass by default instead of an associative object, which can't be used for
array_diff or array_intersect later

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2025-06-16 08:30:31 +02:00
Côme Chilliet
2406677b40
fix: Do not use circle provider class constant
This is to avoid issues if the circles app is disabled but you still
 have circles shares in your DB

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-16 10:50:41 +02:00