Commit graph

1567 commits

Author SHA1 Message Date
Joas Schilling
bacf8c61a8 fix(sharing): Don't change the type of the controller argument
[EA] New value type (\DateTime) is not matching the resolved parameter type and might introduce types-related false-positives.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-06-11 14:17:57 +01:00
fenn-cs
5d86c407a7 fix(shareApiController): avoid duplicated expiryDate operations
`expireDate` can be set once and used anywhere needed, the current implementation,
duplicates this behavior which leads to `parseDate` receiving an a date object it
parsed and returend earlier in the createShare method.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-06-11 14:17:57 +01:00
fenn-cs
b0d4661a1b refactor(shareApiController): use contrusctor property promotion & DI logger
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-06-11 14:17:57 +01:00
John Molakvoæ
8eb3a6ec83
Merge pull request #44009 from nextcloud/backport/43252/stable27 2024-06-07 11:05:32 +02:00
fenn-cs
29f717a999 fix(ShareApiClients): Maintain meaning of '' and null for share api clients
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-29 12:26:29 +00:00
fenn-cs
bdeba6590d test(Sharing): Integration test for no expiration set date for share
- Verify that explicitly sending empty `expireDate` param to server overwrite default

and sets not expiry date, if non is enforced.

- Update tests to avoid converting empty string to date.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-25 11:18:41 +01:00
fenn-cs
13688f39a7 fix(shareManager): Respect empty expireDate in server
If `expireDate` is an empty string and not `null` then the server should not set a default.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-24 15:30:49 +01:00
Git'Fellow
8e5b14cd6c
Fix backport
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-04-19 18:54:40 +02:00
Stephan Orbaugh
bc73ac6347
Merge pull request #44415 from nextcloud/backport/44132/stable27
[stable27] fix: don't return null for SharedStorage::getWrapperStorage with share recursion
2024-03-25 15:32:08 +01:00
Robin Appelman
02b369bd50 fix: add extra check to ensure wrapped shared storage is set
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-22 19:44:48 +00:00
Robin Appelman
7982645f66 chore: improve typing for SharedStorage::$storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-22 15:42:45 +00:00
Robin Appelman
459c17492b fix: don't return null for SharedStorage::getWrapperStorage with share recursion
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-22 15:42:45 +00:00
Robin Appelman
812872ca4e
Merge pull request #44321 from nextcloud/backport/39990/stable27
[stable27] add some recrusive detection/prevention
2024-03-22 15:43:53 +01:00
Robin Appelman
406a59ccae
fix: add some recrusive detection/prevention
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-19 15:02:30 +01:00
Joas Schilling
a1acc516df fix(sharing): Align wording for declining a share
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-03-19 11:19:36 +00:00
Ferdinand Thiessen
aaa849e491 fix(files_sharing): ShareesAPI - Return empty response when user is not allowed to share
Resolves: https://github.com/nextcloud/server/issues/20950

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-15 16:57:31 +00:00
Christoph Wurst
83fa8b5ddd fix(sharing): Avoid (dead)locking during orphan deletion
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

[skip ci]
2024-03-05 21:05:34 +00:00
John Molakvoæ
de66363230
Merge pull request #43832 from nextcloud/backport/43428/stable27 2024-02-29 11:26:04 +01:00
Robin Appelman
d878263dda
fix: only cleanup orphaned shared daly
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-26 10:31:25 +01:00
Benjamin Gaussorgues
1b30da153c feat(share): save date and time for expiration
Because of timezones, not saving time can lead to unexpected behaviour
when sharing an item sooner than timezone offset
Example: sharing a file before 9am when in UTC+9

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-02-26 09:10:26 +00:00
fenn-cs
080390976f Use @nextcloud/capabilities to obtain share api defaults
- Remove redundant initial state added

- Call `getCapabilities()` in share config file.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-02-04 11:44:15 +01:00
fenn-cs
73f0f7c198 Consider admin defaults when creating shares
The current share logic always uses the default `BUNDLED_PERMISSIONS.ALL`
which includes everything.

This commit updates share creation logic to use `defaultPermissions` if set
by admin for the creation of new shares.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-02-04 11:44:15 +01:00
Benjamin Gaussorgues
ee6a10f8f5
fix(share): use user timezone to parse share expiration date
If an user in UTC+1 try to create a share at 00:00, it's day D for him, but

D-1 for the server (UTC).

This fix aims to apply the correct offset

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-01-15 11:55:03 +01:00
Robin Appelman
fbc0f65711 add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-05 09:47:03 +01:00
Julius Härtl
ce9e5e655f fix: Also cleanup orphaned shares user cannot be found anymore
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-11-21 15:22:03 +00:00
Benjamin Gaussorgues
1af4301997
Merge pull request #41363 from nextcloud/optmize-storage-wrappers-27
[27] optimize builtin storage wrappers
2023-11-16 14:21:56 +01:00
Robin Appelman
bdba3f1e2f
optimize builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-09 15:41:01 +01:00
Max
31978f447a fix(sharing): set name to target name in sharing cache
Fixes #39879.

Signed-off-by: Max <max@nextcloud.com>
2023-10-23 17:38:00 +00:00
Maxence Lange
0fac750bcd ocm services
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-09-22 17:26:02 -01:00
fenn-cs
51ad9cfcc8 Enfore allowPublicShares admin setting
Use the the modern intial-state library to pass data about
`allowPublicUploads` to the sharing frontend.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-09-13 10:18:08 +01:00
Andy Scherzinger
bfd7b49be7
Merge pull request #40074 from nextcloud/backport/39944/stable27
[stable27] pass the share to the cache instead of having to ask the storage
2023-08-31 11:47:23 +02:00
Joas Schilling
7ffc89e7ff fix(cache): Remove displayname cache entry on delete
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 16:18:59 +00:00
Robin Appelman
5df53bd0fd pass the share to the cache instead of having to ask the storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-28 12:02:17 +00:00
Joas Schilling
aaa620044c fix(notifications): Remove share notification when the node is deleted
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-04 07:52:46 +00:00
Maxence Lange
3b93a35108 display displayname on federated shares
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-07-11 09:25:09 -01:00
Robin Appelman
f0c60686da add command do delete orphan shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-10 11:26:32 +00:00
Robin Appelman
2ea41dab93
repair -1 folder sizes for object store background scan
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-10 19:33:26 +02:00
Louis Chemineau
6b53e4b13a Mutualize expireDate handling when creating and updating a share
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-04-27 16:26:24 +02:00
Robin Appelman
1bff4e23bf
Merge pull request #37525 from nextcloud/file-debug-info
add command for getting fileinfo for debugging
2023-04-21 14:18:05 +02:00
rakekniven
86b17e2248 Update apps/files_sharing/lib/Controller/ShareAPIController.php
Co-authored-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2023-04-18 12:08:38 +02:00
rakekniven
eaaeb32074 fix(l10n): Fixed grammar
Reported at Transifex.
  
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>


Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2023-04-18 12:08:38 +02:00
Robin Appelman
60cf0c8f5f
add command for getting fileinfo for debugging
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-17 16:23:52 +02:00
jld3103
dcf6ebebab
Fix inherited parameter names
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-03 08:29:33 +02:00
Michiel de Jong
c0e84cb512 Add SHARE_TYPE_SCIENCEMESH
Signed-off-by: Michiel de Jong <michiel@unhosted.org>
2023-03-08 16:46:55 +01:00
Côme Chilliet
74811813e7 Avoid extra parenthesis around SQL in IN expressions
The expression builder already suround the SQL with parenthesis when
 using in(), so we must not add another pair, this confuses at least
 sqlite.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-21 13:37:30 +00:00
Julius Härtl
38ca468502
Merge pull request #36515 from nextcloud/fix/sharees-remove-deck 2023-02-16 21:17:16 +01:00
Joas Schilling
80071bd8b9
fix(sharing): Remove casting to int from INF
Regression from nextcloud/server#35736
INF is a the float INF, casting it to integer will make it 0

Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-07 14:13:39 +01:00
Vincent Petry
1fed799826
Merge pull request #36452 from nextcloud/perf/share-availability-check
perf(federation): Only request root share info for checking availability
2023-02-03 13:34:35 +01:00
jld3103
30858df737
Remove Deck from Sharees API
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-02-03 12:01:37 +01:00
Louis Chemineau
4ab3c16403 Pluggable share provider
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-02-02 15:41:26 +01:00