Commit Graph

107 Commits (8130968a352bcf66606a076598fa4a58a291bc6d)

Author SHA1 Message Date
Andy Scherzinger 9d4b944098
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-27 20:11:22 +07: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 +07:00
Christoph Wurst b6e1685683
fix(dav): ACLs for shared addressbooks
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-03-21 11:50:35 +07:00
Richard Steinmetz 53ef6c5f71
feat(dav): update a principal's schedule-default-calendar-URL
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-02-28 14:51:10 +07:00
Hamid Dehnavi 7bf31df0bc Refactors "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2024-02-23 15:54:10 +07:00
Louis Chemineau 8e95d0f3ae
Check share attributes when downloading versions
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 15:06:01 +07:00
Anna Larch dce69154ba enh(sharing): enable unsharing for sharees for DAV shares (addressbooks and calendars)
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-02-15 18:01:12 +07:00
Louis Chemineau 25274f92b7
Improve view only error message
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-01-10 17:04:26 +07:00
Louis Chemineau 6aa2d2daee
Don't query oc_properties for metadata props
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-12-18 13:09:20 +07: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 +07: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 +07:00
Christoph Wurst 9627176a23
Merge pull request #38610 from fsamapoor/replace_strpos_calls_in_dav_app
Refactors "strpos" calls in /apps/dav
2023-09-17 10:14:20 +07:00
Robin Appelman 31c483b759
preload shares for calendars when listing calendars
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-26 14:36:37 +07:00
Daniel aa5dcb0952
Merge pull request #38397 from nextcloud/enh/contacts/hide-adressbook-option
enh(contacts): show/hide addressbooks for all
2023-07-18 17:05:12 +07:00
Johannes Merkel bb802956a2 enh(contacts): show/hide addressbooks for all
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
2023-07-10 13:39:15 +07:00
Robin Appelman 95c3b8131a
preload custom properties when propfinding folders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-09 02:55:57 +07:00
Faraz Samapoor 8c64ccae01 Fixes "PossiblyNullArgument" Psalm warnings.
Co-authored-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-12 09:46:07 +07:00
Faraz Samapoor 0bae21b1d1 Refactors "strpos" calls in /apps/dav to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-12 09:46:07 +07:00
Thomas Citharel c9a3129cb4 fix(CalDAV/CardDAV): put every method from Cal/CardDAV backends that does multiple DB calls in transactions
In a lot of methods we're doing read-after-writes (for instance calling
updateProperties after touching calendar objects).
There's also a lot of deleting methods that do stuff sequentially which
could cause trouble.
This should avoid this kind of issues.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-04-17 16:08:44 +07:00
jld3103 7e58aa1a05
Fix DAV types
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-05 07:06:50 +07:00
Maximilian Martin 245351fdae assign group share value
Signed-off-by: Maximilian Martin <maximilian_martin@gmx.de>
2023-02-20 10:10:17 +07:00
Vincent Petry ecf6b7667b Extend ViewOnly DAV plugin to versions endpoint
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2023-01-13 09:27:16 +07:00
Côme Chilliet b5ccece5a9
Do not output a warning when a file is not found
This would spam log with warnings from Desktop client doing HEAD on
 non-existing path to test them.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-09-12 16:04:02 +07: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 +07:00
Vincent Petry c1df72fc8b
Fix copy in view-only mode
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-26 14:18:47 +07:00
Côme Chilliet cb271b759e
Fix dynamic property creations in test files
This fixes warnings in PHP 8.2

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 15:07:53 +07: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 +07:00
Vincent Petry 2ee659e547
Fix view-only code after code review comments
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:24 +07: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 +07: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 +07:00
luz paz d4637ef4d8 Fix typos in apps/dav subdirectory
Found via `codespell -q 3 -S l10n -L jus ./apps/dav`

Signed-off-by: luz paz <luzpaz@github.com>
2022-07-26 17:40:10 +07:00
Arthur Schiwon ec09605109
catch any exception for transaction control
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-06 16:14:51 +07:00
Arthur Schiwon 794177e753
DAV custom props: catch Exception and rollback transaction in case
- before exceptions were not caught, a started transaction might not have
  been finished
- also resolve depractions and use IQueryBuilder

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-01 22:44:20 +07:00
Carl Schwan 3598ec4028 Add typing to Sharing Backend
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-22 10:25:17 +07:00
Côme Chilliet c54fb5f9e6
Use {$var} instead of ${var} for PHP 8.2 compatibility
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-14 15:12:28 +07:00
Thomas Citharel bd8b2137e2
Allow DAV Object properties
The current implementation only saves them as string. It seems they can
be more complex than that, and that objects were saved directly.

You may find such objects saved in some production databases by
executing:
```sql
SELECT * from oc_properties where propertyvalue = 'Object';
```

This commit adds a repair job to clean all of these "broken" properties
values, adds a new database column to save the type of the property, and
handles converting from and to correct values.

Implementation is very similar to SabreDAV's own PDO backend: 4921806dfb/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-16 15:02:00 +07:00
Julius Härtl a54fc45311
Add known dav properties to ignore list
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 17:01:42 +07:00
Côme Chilliet 40cdc54ae8
Convert properties value to string before passing them to database
This avoids an error when passing a complex property to PROPPATCH under
 PHP >= 7.4.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-20 15:08:04 +07:00
Anna Larch 926fb5b3de Change return type to correct type
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-10-14 21:05:25 +07:00
Arthur Schiwon 27865d03c0
use specific email getter where necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-09 19:23:05 +07:00
Christoph Wurst baf4ad1774
Allow certain custom DAV props to be readable by everyone
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-08 13:57:00 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Thomas Citharel 1c0d975654
Make dav respect disallowing sharing with groups
Closes #25390

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-05-26 11:19:59 +07:00
dependabot-preview[bot] eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +07:00
Arthur Schiwon bd8b43127f
take into account that UNIQUE index might not work as expected
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-29 17:29:10 +07:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +07:00
Christoph Wurst fbf25e164d
Merge pull request #24515 from nextcloud/fix/noid/dav-share-groups-special-chars
fixes sharing to group ids with characters that are being url encoded
2020-12-18 12:01:49 +07:00
Arthur Schiwon 9abff14e8d
fix finding of groups with decodable chars in their id via DAV
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-16 22:28:20 +07:00
Arthur Schiwon 1186977589
fixes sharing to group ids with characters that are being url encoded
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-16 22:15:02 +07:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00