Commit graph

280 commits

Author SHA1 Message Date
Ferdinand Thiessen
8c087c8436
Merge pull request #52043 from nextcloud/backport/52013/stable31
[stable31] fix: Handle missing share providers when promoting reshares
2025-04-14 17:19:31 +02:00
skjnldsv
f81ef274dd fix(files_sharing): fix share creation error handling
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-09 15:22:32 +00:00
Daniel Calviño Sánchez
a9437209b9 fix: Handle missing share providers when promoting reshares
The provider for mail shares is not available when the "sharebymail" app
is disabled, and in that case a "ProviderException" is thrown when
trying to get it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-04-08 13:34:11 +00:00
provokateurin
e8b7ddd14e
fix(Share20\Manager): Propagate user and group deletion to remote share providers
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-04 07:57:00 +01:00
Ferdinand Thiessen
0f298e1db1 fix(sharing): Move permission validation to share manager
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-28 17:26:28 +00:00
provokateurin
9fafcb267c Revert "fix(Share20\Manager): Ensure node is still accessible when checking share"
This reverts commit c2ca99e2f6.

Signed-off-by: provokateurin <kate@provokateurin.de>
2025-01-24 09:47:35 +00:00
Ferdinand Thiessen
fb8802a783 fix(sharing): Set correct password context for share password validation
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-20 18:16:24 +01:00
Christopher Ng
8b26383d00 feat(sharing): Add shareapi_allow_custom_tokens config
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2025-01-15 15:50:43 -08:00
Christopher Ng
beffb26266 feat(sharing): Fetch a unique generated token
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2025-01-15 15:49:19 -08:00
Côme Chilliet
17007f6b8d fix(shares): Wrap exceptions from password validation to set code to 400
This fixes a regression that bad password returned 403 instead of 400
 because of previous changes.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-12-12 15:39:48 +01:00
Côme Chilliet
28d7206e5c fix(files_sharing): Do not wrap password policy exception into a generic one
Let the controller access the HintException and show the error to the user.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-12-12 15:39:48 +01:00
provokateurin
715e7143f0
fix(files_sharing,files): Do not validate shares before adjusting the owner
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
provokateurin
c2ca99e2f6
fix(Share20\Manager): Ensure node is still accessible when checking share
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
provokateurin
c378e74017
feat(Share20\Manager): Return all shares on IShareOwnerlessMount
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
Côme Chilliet
d6ba524263
fix: Use getRelativePath method to check if node is inside folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-14 17:23:29 +02:00
Côme Chilliet
e584e9baf7 fix: Fix promotion of reshares from subsubfolders
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-14 11:58:47 +02:00
Côme Chilliet
3094e7020e chore: Add comment to make code clearer
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-14 11:58:47 +02:00
Côme Chilliet
6bd597b275 chore: Turn method description into phpdoc
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2024-10-14 11:58:47 +02:00
Côme Chilliet
d78f8280e8 fix(shares): Promote reshares into direct shares when share is deleted
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-14 11:58:47 +02:00
Côme Chilliet
7e9bc7c8cf fix: Tidy up code for reshare deletion
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-14 11:58:47 +02:00
Luka Trovic
42181c2f49 fix: delete re-shares when deleting the parent share
Note: Removed part about fix command from original PR

Signed-off-by: Luka Trovic <luka@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-14 11:58:47 +02:00
ernolf
b4ea146d10 feat(share): make sharelink token length configurable
- ensure unique share token with dynamic length adjustment

Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
2024-09-28 08:06:24 +02:00
Git'Fellow
dcbe8da2a6 fix(l10n): Rephrasing some exceptions to be translated
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: Fix tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-09-20 18:35:11 +02:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +02:00
rakekniven
b8774816f6
chore(i18n): Spelling of ID
Reported at Transifex

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2024-09-06 19:21:07 +02:00
Anna Larch
8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +02:00
John Molakvoæ
f4aa2644ee fix: adjust sharing controller exceptions case
Co-authored-by: F. E Noel Nfebe <fenn25.fn@gmail.com>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-09-04 09:03:45 +02:00
Git'Fellow
f250643e7a fix(l10n): Translate all share exceptions
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix drone

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-09-04 09:03:45 +02:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
Robin Appelman
a92171260f fix: check for correct storage class when checking for link parent
fixes #39123

Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-16 13:13:31 +02:00
Ferdinand Thiessen
3d136e4466
fix: Add acceptShare as an interface
It was commented out because at that time no other share provider
supported the `acceptShare` method. Today it is the same no other provider
supports it, but we should make it discoverable by adding it to the public API
as an additional interface.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-30 15:25:51 +02:00
skjnldsv
d388370c3b feat(files_sharing): implement IShareProviderWithNotification and refactor sendMailNotification
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
Louis Chemineau
f5fd6c8f08
fix(files_sharing): Store the expiration date relative to the server's timezone
This is needed as we want to store the difference between the server's and the user's timezones.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-06-26 12:49:42 +02:00
skjnldsv
4a77fe3530 fix(dav): also return shared-with-me shares data
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-06-12 10:27:29 +02:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
fenn-cs
f5a433f946 refactor(shareManager): Use constructor property promotion
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-23 14:11:33 +01:00
fenn-cs
59a5b4e0bd 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-23 14:11:33 +01:00
Robin Appelman
54afea4b01
Merge pull request #44460 from nextcloud/remove-non-shallow-in-folder
refactor: remove non-shallow getSharesInFolder
2024-05-17 17:41:25 +02:00
Robin Appelman
4c085ef129
fix: cleanup logic for getting the max reshare permissions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-05-03 14:53:18 +02:00
Robin Appelman
ccd56672e8
refactor: remove non-shallow getSharesInFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-05-01 16:46:06 +02:00
Côme Chilliet
ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +02:00
Adam Serbinski
34ca6bd46a ShareByMailProvider: getAccessList: recommended style changes
Signed-off-by: Adam Serbinski <adam@serbinski.com>
2024-03-21 18:25:31 -04:00
Adam Serbinski
9c528d412c ShareByMailProvider: getAccessList: add token to returned array
This allows the share URI to be regenerated.

Signed-off-by: Adam Serbinski <adam@serbinski.com>
2024-03-21 18:25:31 -04:00
Adam Serbinski
26ae5e6dfb ShareByMailProvider: getAccessList: return full list of recipients
Previously was returning only boolean true if the Node was shared
by email, or false if not. Now provides an array containing the
list of email share recipients.

Signed-off-by: Adam Serbinski <adam@serbinski.com>
2024-03-21 18:25:31 -04:00
Maxence Lange
bf71bd1305 fix(share): use share owner to confirm reshare
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-03-20 00:31:09 -01:00
Robin Appelman
339702e376 refactor: make share manager buildable
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 14:33:51 +01:00
Robin Appelman
e7a7b4a401 perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-04 13:57:31 +01:00
Benjamin Gaussorgues
01983d50d4
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-22 11:26:01 +01:00
John Molakvoæ
4a509dfe8e
fix: phpunit
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-02-13 21:06:31 +01:00
Vincent Petry
839ddaa354
feat: rename users to account or person
Replace translated text in most locations

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2024-02-13 21:06:30 +01:00