Commit graph

140 commits

Author SHA1 Message Date
Marcel Klehr
0273b4d0ba perf(sharing): Use oc_share.{item_type, share_type} IN instead of OR equals
to improve performance by using the db index

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-03-28 14:46:30 +01:00
Louis Chemineau
a56cff70e1 fix: Exclude non accepted shares when computing access list
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-30 09:18:41 +00:00
Git'Fellow
20215fbd09 fix(shares): Remove noisy text from emails
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-12-16 15:16:33 +01:00
Git'Fellow
f86fb0fee2 fix(share): Don't print twice the same information
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-12-10 18:27:31 +01:00
provokateurin
a978e0a806
fix(Share20\DefaultShareProvider): Return link shares in getSharesByPath()
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
provokateurin
762b09049b
fix(Share20\DefaultShareProvider): Sort getSharesByPath() results
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
Ferdinand Thiessen
2ef74b9860
Merge pull request #47329 from nextcloud/feat/add-datetime-qbmapper-support
feat(AppFramework): Add full support for date / time / datetime columns
2024-10-18 19:05:08 +02:00
Git'Fellow
a1681b0756 chore(db): Apply query prepared statements
Fix: psalm

fix: bad file

fix: bug

chore: add batch

chore: add batch

chore: add batch

fix: psalm
2024-10-17 20:30:47 +02:00
Ferdinand Thiessen
db94e10af0
fix: Prevent breaking change in IQueryBuilder
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +02:00
Ferdinand Thiessen
e314d52118
fix: Adjust parameter type usage and add SQLite support
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +02:00
Ferdinand Thiessen
2e4d3e4e75
fix(share): Return empty string if no label is set
* Resolves: https://github.com/nextcloud/server/issues/48629

While the database supports NULL, the typing has always said it only returns *string*.
So to not break any apps that might trust the typings we should return `''` if the database is set to `NULL`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-14 15:15:51 +02:00
Stefan Cherniakov
457eaee2b3 fix(files_sharing): Add missing check for null & use bool instead of int for reminder_sent field
Signed-off-by: Stefan Cherniakov <luka-sama@pm.me>
2024-09-03 17:23:31 +02:00
Stefan Cherniakov
d633b9bce6 fix(files_sharing): Make share reminders more stable & fix issues
Signed-off-by: Stefan Cherniakov <luka-sama@pm.me>
2024-09-03 13:37:17 +02:00
Robin Appelman
cc091b150e
fix: fix share cleanup for deleted groups with sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:21:20 +02:00
Robin Appelman
f5b3486744
feat: add option to automatically partition queries by specific tables
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:18:53 +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
Côme Chilliet
e23325f047
fix: Remove shares only if there are no more common groups between users
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-12 15:20:21 +02:00
Louis Chemineau
5559beb28c
fix(files_sharing): Delete user shares if needed when user is removed from a group
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-08-12 14:41:19 +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
967b3848e0 fix(files_sharing): phpunit & openapi fixes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
skjnldsv
30f9ef414e fix: psalm, cs, autoloader and lint
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
skjnldsv
75ca4944c9 feat(files_sharing): allow mixed values in share attributes and allow storing email arrays
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
skjnldsv
c253112cf7 chore(files_sharing): refactor mail handling
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +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
Robin Appelman
7f6a891110
use LazyUser in DefaultShareProvider
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-06-17 17:42:45 +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
Robin Appelman
ccd56672e8
refactor: remove non-shallow getSharesInFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-05-01 16:46:06 +02:00
skjnldsv
c0e7ea55df fix(sharing): resolveGroupShares setPermissions on null
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-03-19 13:09:10 +01:00
Robin Appelman
0e7497296f perf: improve performance of resolving group shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-16 13:20:08 +01:00
Robin Appelman
bfeb97c54a fix: also filter by storage when getting shares in folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 15:33:05 +01:00
Côme Chilliet
c0ce272e9c chore: Migrate away from OC::$server->getLogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-13 17:32:30 +01:00
Hamid Dehnavi
ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +03:30
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
Faraz Samapoor
e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
Arthur Schiwon
28e7235f87
hide shared files located in group folder's trash bin
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-03-28 14:13:12 +02:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Joas Schilling
99953a859b
Show group name instead of group id as recommendation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-10-08 16:05:52 +02:00
Carl Schwan
a1011bad6c
Use bigger slice in share provider
Probably won't make a big difference as it is unlikely a user has > 100
shares but this make sure we use the same code in spreed where the
change has a bigger impact.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-16 11:17:27 +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
bbb5043c07
Inherit hide download from share attributes
When resharing by link, if the download permission was removed through
share attributes, convert it to the hide download flag.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:54:13 +02:00
Vincent Petry
dbbc426f75
Attempt to fix sqlite json issue
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:23 +02:00
Vincent Petry
a95c19e14b
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +02:00
luz paz
368f83095d Fix typos in lib/private subdirectory
Found via `codespell -q 3 -S l10n -L jus ./lib/private`

Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 -04:00
Louis Chemineau
f525067930 Add argument to getSharesInFolder enable deep share lookup
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-07-26 12:17:46 +00:00
Louis Chemineau
ce7b6ffed2 Prevent column name conflict between tables
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-07-26 12:17:46 +00:00
Carl Schwan
81500bf837 Fix getting shares in a folder on Orache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:03:25 +02:00
Robin Appelman
e83ad8cfad
fix shared mount roots not being returned from getSharesInFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-31 17:25:56 +02:00
Carl Schwan
6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +01:00
Julius Härtl
5116bf146f
Allow to pass note when creating a share and send it with directly in the share mail when set
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-03 10:17:02 +01:00