Commit Graph

910 Commits

Author SHA1 Message Date
Robin Appelman
0ab1cc5f17 refactor: make share manager buildable
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-06-13 18:34:51 +02:00
fenn-cs
30900ae751 refactor(shareApiController): use contrusctor property promotion & DI logger
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-06-10 09:08:02 +01:00
Christoph Wurst
64469efa29 fix(sharing): Avoid (dead)locking during orphan deletion
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

[skip ci]
2024-05-29 10:55:28 +02:00
Ferdinand Thiessen
ee02016dc1 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:47:50 +00:00
Benjamin Gaussorgues
a4a7d82a0c 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:12:03 +00:00
Ferdinand Thiessen
5f380181f9
fix(tests): Adjust legacy tests for nextcloud-router update
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-01-24 19:29:08 +01:00
Benjamin Gaussorgues
57574d9d9a 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 09:22:09 +00:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Robin Appelman
efe68d012c
Merge pull request #39044 from nextcloud/more-empty-mount-checking
Fix root mounts not being setup in some cases
2023-10-24 16:54:05 +02:00
Julius Härtl
f3ae617bde
test(files_sharing): Test if recent files result use actual share target name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-10-18 14:31:27 +02:00
Joas Schilling
500fa5431d
Fix unit tests on PHP 8.3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-16 10:17:22 +02:00
Joas Schilling
cd659b7119
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-12 11:36:35 +02:00
Hamid Dehnavi
d64bbc8bd3 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 12:18:41 +03:30
Maxence Lange
8b9e7e235d ocm controller
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-09-20 08:23:45 -01:00
Robin Appelman
5685d68bd3
add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-12 16:50:24 +02:00
Robin Appelman
64f62f7cfd
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
move share permission logic to storage wrapper
2023-09-04 14:05:14 +02:00
John Molakvoæ (skjnldsv)
f828dce597
Fix sharing creation insert and get
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2023-09-02 10:25:24 +02:00
Joas Schilling
26c734abe4
fix(tests): Specify all positional parameters again to fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-23 09:08:08 +02:00
Robin Appelman
e73889a240 cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-16 15:25:05 +02:00
Robin Appelman
a031bc4788 more share permission logic to storage wrapper
this way we only have to determine the share permissions once

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-14 18:17:27 +02:00
Joas Schilling
44b4c16a09
Merge pull request #39605 from nextcloud/bugfix/noid/final-events-cleanup
fix!: Final round of moving to IEventDispatcher
2023-08-04 10:39:57 +02:00
Kate
30345f86dc
Merge pull request #39330 from nextcloud/feature/openapi/files_sharing
files_sharing: Add OpenAPI spec
2023-08-01 10:04:13 +02:00
jld3103
c6806684d2
files_sharing: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-31 16:58:49 +02:00
Joas Schilling
cebf93d4d2
fix: Remove legacy dispatcher from share manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:20 +02:00
Joas Schilling
77bc6c32d8
fix(dispatcher): Move remaining simple cases in apps/ folder to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-25 11:19:26 +02:00
John Molakvoæ
f5f142d31b
fix: adjust testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-07-11 13:52:28 +02:00
Benjamin Gaussorgues
29c1848eda
Migrate files sharing to PSR LoggerInterface
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-07-06 14:08:42 +02: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
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
Joas Schilling
98ed72b3ed
Revert "fix(performance): Do not set up filesystem on every call" 2023-02-21 07:36:43 +01:00
Julius Härtl
20058eb9de
tests: Fix test isolation on object storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-02-17 19:18:38 +01:00
Côme Chilliet
892e6c642a
Skip buggy tests for 32bits CI
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:33 +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
Robin Appelman
6fcc1f5684
add test for shared mount conflict resolution
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-01-09 15:30:45 +01:00
Julius Härtl
628b0d8fc4
Merge pull request #35213 from PLUTEX/32611-ocs-api-share-permissions
Honor permissions of new link share via OCS API
2022-12-22 15:42:42 +01:00
Jan-Philipp Litza
a7abe2c35a Honor permissions of new link share via OCS API
The API currently overrides the supplied permissions with "read only"
when a file is shared via link. It allows to update the permissions
later, however.

This keeps the default to "read only" but honors the permissions
supplied by API call if any.

Signed-off-by: Jan-Philipp Litza <jpl@plutex.de>
2022-12-06 16:00:20 +01:00
Côme Chilliet
578648a062
Adapt tests to new job constructors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-05 10:41:13 +01:00
Côme Chilliet
c79a6b3f62
Fix errors from PHP 8.2 testing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 17:08:21 +01:00
Carl Schwan
2f406e5403 More fixes
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 14:41:13 +02:00
Carl Schwan
8e3f21d9ed Small progress with fixing unit tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-11 14:00:15 +02:00
Carl Schwan
02d55eb90f
Merge pull request #33941 from nextcloud/fix/public-sharing
Only normalize data in public shares and not crud
2022-09-15 16:43:01 +02:00
Carl Schwan
7ded5a769b
Only normalize data in public shares and not crud
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-08 14:51:28 +02:00
luz paz
9d26671f05 Fix typos in apps/ subdirectory
Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/`

Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-09-05 12:59:54 +00:00
Julius Härtl
6ad600ea8a
Fix jsunit tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 14:15:42 +02:00
Robin Appelman
1626a56dda
adjusts tests for CloudIdManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-31 15:47:00 +02:00
Vincent Petry
696a48ae97
Merge pull request #33430 from nextcloud/fix/remove-broken-resetstorage
Remove broken function resetStorage from test cases
2022-08-25 17:05:45 +02:00
Carl Schwan
fa48430feb
Revert "Revert "Remove inefficient fed share scanner""
This reverts commit 6667007bf2.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 15:17:51 +02:00
Côme Chilliet
262f7d92f0
Remove broken function resetStorage from test cases
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-02 09:19:09 +02:00
Carl Schwan
7b723813ce
Multiple fixes
- Fix tests
- Use non deprecated event stuff
- Add a bit of type hinting to the new stuff
- More safe handling of instanceOfStorage (share might not be the first
  wrapper)
- Fix resharing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-31 19:37:59 +02:00
Vincent Petry
03b1791cca
Fix share attribute related tests + code style
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +02:00