John Molakvoæ (skjnldsv)
d89edb28c4
move migration
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 15:02:50 +01:00
John Molakvoæ (skjnldsv)
9afff2fb20
Properly set uid and create and update
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 15:00:49 +01:00
Julius Härtl
b9c5e569d3
Update AddressBookImpl documentation
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 14:43:08 +01:00
Julius Härtl
61af607525
Make enhancing entries with type property optional
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 10:19:35 +01:00
Julius Härtl
8b92a6c9cb
Add type of properties to address book results
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 10:19:34 +01:00
Julius Härtl
45d8aeb9f2
Remove federated sharing address books which are the same as local ones
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 10:19:33 +01:00
Georg Ehrke
83639a9898
remove LogicException, because it's also triggered with legitimate parameters
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-09-05 14:10:26 +02:00
Thomas Citharel
a311798674
Remove users from system addressbook when user deactivated
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-08-06 09:30:21 +02:00
Roeland Jago Douma
240006bdf5
When sharing calendars and addressbooks the principal has to be verified to be valid
...
d3fb8fcdd3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-27 20:51:36 +02:00
Morris Jobke
236086c457
Merge pull request #8335 from nextcloud/remove-unused-import
...
Remove unused import statements
2018-02-14 22:23:07 +01:00
Morris Jobke
d3d045dd5c
Remove unused import statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-14 16:55:43 +01:00
Morris Jobke
e2974f1133
Simplify return statement
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-13 21:55:24 +01:00
Morris Jobke
0a56d2185e
Return value immediately instead of assigning to a one-time variable
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 00:02:03 +01:00
Roeland Jago Douma
0585b776fb
Do no run SyncJob in cron
...
Fixes #7184
The SyncJob can be very resource intensive. Since it requests all users
on the system to create the system addressbook. In order to do this it
creates a vcard for every user and updates the addressbook.
There is no need for this job since the proper signals are emitted and
handled in the carddav backend to update the addressbook live.
Worst comes to worst there is always the occ command to bring the
address book in sync again.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-02 10:00:01 +01:00
Tobia De Koninck
f6ef779f97
Make ContactsStore a public API
...
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
2017-12-11 18:18:58 +01:00
Roeland Jago Douma
40633c5e54
CardDAV convertor check should not be to wide
...
Case: email is set to null, but the avatar is set. In the old case the
email would set $emptyValue but $noImage would still be false. This we
would set the empty string as email.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-11 11:58:02 +01:00
Morris Jobke
31c5c2a592
Change @georgehrke's email
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Joas Schilling
3b4ab6560b
Check if the user/group exists for dav shares
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-05 12:48:10 +02:00
Thomas Citharel
f1bfd4433e
Don't add a LIKE condition when it's not needed
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-09-25 09:10:44 +02:00
Joas Schilling
89238164e1
Fix comparisons in the dav app
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-01 13:55:07 +02:00
Roeland Jago Douma
fc369dd86e
[DAV] Fix URLUtil::splitPath usage
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 08:20:17 +02:00
Lukas Reschke
3d2600b039
Add Phan plugin to check for SQL injections
...
This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues.
As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections.
The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-20 22:48:13 +02:00
Georg Ehrke
35781ae45c
urldecode group principals in Cal- and CardDAV backend
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-06-12 21:01:30 +02:00
Roeland Jago Douma
92408390b0
Fix ImageExportPluginTest
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:49 +02:00
Roeland Jago Douma
747990b03a
No more XSS
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:49 +02:00
Roeland Jago Douma
3ab53d000f
Clear cache on vcard change/delete
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:49 +02:00
Roeland Jago Douma
34d97aa51c
Request proper size for contacts menu
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:49 +02:00
Roeland Jago Douma
dd430c2fd7
Cache the carddav photo endpoint
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:49 +02:00
Roeland Jago Douma
303c0dd6a8
Always dispatch Carddav events
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:47 +02:00
Roeland Jago Douma
59e27f03b6
Add caching to the imageexport plugin
...
Since we now heavily use this endpoint for the contacts menu we better
set proper caching on the images. Else this gets reload over and over
again leading to slow loading menu and unneded bytes transfered.
* cache for 1 hour by default
* added ETag for validation
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-02 12:30:34 +02:00
Morris Jobke
3e37a5f1c7
Merge pull request #3770 from nextcloud/faster-search-in-contacts
...
Factorize query for searching contacts
2017-04-27 00:25:30 -03:00
Joas Schilling
3d671cc536
Merge pull request #4443 from nextcloud/cleanup-unused-imports
...
Remove unused use statements
2017-04-24 11:47:37 +02:00
Roeland Jago Douma
d842b29c5b
Merge pull request #4401 from nextcloud/caldav-carddav-nc-owner-displayname
...
add owner-displayname property to calendars and addressbooks
2017-04-24 09:17:55 +02:00
Georg Ehrke
c89e057d27
add owner-displayname property to calendars and addressbooks
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-23 11:26:49 +02:00
Morris Jobke
c54a59d51e
Remove unused use statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Morris Jobke
2b6f6dac00
Remove unused variables
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 18:20:51 -05:00
Roeland Jago Douma
6d1651452f
Add back the name query part
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-21 20:43:40 +02:00
Thomas Citharel
ecba3722da
Factorize query for searching contacts
2017-04-21 20:43:36 +02:00
Joas Schilling
088f4422f9
Fix remaining "PHP Inspection" warnings
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 10:44:11 +02:00
Joas Schilling
62ef59616d
Add public access modifier to all methods
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 10:44:11 +02:00
Joas Schilling
c2d1e6e7ff
Restrict share handling to the owner only
...
Otherwise group members can remove the share for the complete group,
remove edit permissions and even single user shares for other users.
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 10:44:11 +02:00
Bjoern Schiessle
d5dec527c9
get addressbook url and carddav user from remote server
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-11 15:04:01 +02:00
Georg Ehrke
896dd76ab5
fix bug with shared_by for own calendars if shared
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-03-25 23:07:09 +01:00
Bjoern Schiessle
ee014bddbd
fix tests
...
calling getAbsoluteBundlePath() in the constructor makes other tests fail
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-24 11:27:01 +01:00
Joas Schilling
33867f331c
Load cert file before syncing addressbooks and contacts
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 11:06:44 +01:00
Bjoern Schiessle
aa26a3ae74
use right format for avatars
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-24 11:06:44 +01:00
Bjoern Schiessle
e637113452
don't add empty values to the vcard
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-24 11:06:44 +01:00
Bjoern Schiessle
faf836b0c0
fix the way we create a new vcard to avoid to have multiple UIDs
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-24 11:06:41 +01:00
Joas Schilling
2eb27c636d
Make sure shares use read-write when available
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-02 12:28:57 +01:00
Joas Schilling
6dbdca0721
Don't waste energy unless necessary
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-02 12:28:56 +01:00
Joas Schilling
6bd4e1f65b
Use the correct principal for shared addressbooks
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-02-23 14:16:00 +01:00
John Molakvoæ (skjnldsv)
7e9411b929
this is public
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2017-02-14 16:56:56 +01:00
John Molakvoæ (skjnldsv)
b8fcd3ce27
getUsersOwnAddressBooks
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2017-02-14 09:21:33 +01:00
Roeland Jago Douma
e9f98fd5a9
VCARDS don't hold binary data
...
* We need to base64 encode the avatar!
* Switched to vcard v4
* User proper data uri
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-23 13:30:32 +01:00
Bjoern Schiessle
8f33d9d1c0
update system address book if the user change the personal settings
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-21 11:29:57 +01:00
Roeland Jago Douma
9fa3a22ddd
Fix tests
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-04 13:37:00 +01:00
Thomas Müller
c778b1bade
Update sabre dav to 3.2 ( #26115 )
...
* Update sabre/dav to 3.2.0
* Adjust code to work with sabre/dav 3.2.0 and it's dependencies
* Adding own CalDAV plugin to fix calendar home property
* Test if there is a user logged in when listing files home
* Update sabre version used by integration tests
* Disable unauthenticated DAV access
This is needed to make Sabre 3.2 behave like we did before.
Eventually we should integrate better with the ACL plugin which itself
should implement an auth failure when appropriate.
=====
* Fixed so cherry-pick was succesfull
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-04 13:35:10 +01:00
Joas Schilling
ce964f0a10
Translate the Contacts addressbook when it's default
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 14:20:01 +02:00
Olivier Mehani
60cab0d73e
Unset user PHOTO before setting new one in OCA\DAV\CardDAV\Converter::updateCard ( #26243 )
...
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
#26242
2016-09-29 17:09:24 +02:00
Joas Schilling
44fbf6f734
Close cursors
2016-09-15 09:47:39 +02:00
Joas Schilling
08c6ca5a1a
Chunk if you have too many contacts
2016-09-14 16:29:58 +02:00
Roeland Jago Douma
94fb5bcbae
Cast query result to int
...
Else we never create the default address book
2016-09-09 19:15:27 +02:00
Lukas Reschke
67439951e6
Filter more mimetypes
...
There's no need to allow more than those defined mimetypes for images.
2016-09-09 12:33:10 +02:00
Robin Appelman
344945bfe9
more efficient check if addressbook and calendar exists for user
2016-08-31 15:08:29 +02:00
Joas Schilling
0c4d471c18
Correctly handle multi-values when converting VCards to array
2016-08-30 12:08:39 +02:00
Joas Schilling
3fbb5de74f
Better displaynames for shared address books
2016-08-24 08:50:25 +02:00
Joas Schilling
0215b004da
Update with robin
2016-07-21 18:13:58 +02:00
Joas Schilling
813f0a0f40
Fix apps/
2016-07-21 18:13:57 +02:00
Robin Appelman
8f84c99e3f
Fix undefined properties
2016-07-08 12:35:16 +02:00
Björn Schießle
5ace6b53f3
get only vcards which match both the address book id and the vcard uri ( #25294 )
2016-06-29 12:13:59 +02:00
Georg Ehrke
3c399be6ec
fix a ImageExportPlugin Test ( #25215 )
2016-06-27 21:26:56 +02:00
Georg Ehrke
1452b74de7
Contacts API: replace raw image data with url ( #25081 )
...
* add uri to AddressBookImpl array
* Introduce ImageExportPlugin for CardDav
* add plugin to v1 routes
* replace binary contact photo with link
* update tests
* Adding unit tests
2016-06-21 15:25:44 +02:00
Lukas Reschke
aba539703c
Update license headers
2016-05-26 19:57:24 +02:00
Joas Schilling
dd9ee10bc0
Move dav app to PSR-4 ( #24527 )
...
* Move Application to correct namespace and PSR-4 it
* Move dav app to PSR-4
2016-05-12 09:42:40 +02:00