Commit Graph

377 Commits

Author SHA1 Message Date
Roeland Jago Douma f6ff624e3d Merge pull request #1733 from nextcloud/dav-events
Activities for calendars, events and todos
2016-11-03 19:31:20 +01:00
Joas Schilling 7a0e003ade
Add more tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 15:24:18 +01:00
Joas Schilling 36b656e207
Add tests for triggerCalendarActivity
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 14:30:02 +01:00
Joas Schilling c4775a5bce
Start unit tests for the activity listener
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 12:57:40 +01:00
Joas Schilling e8f82c6b61
Add tests for dispatching of the events
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 12:28:12 +01:00
Joas Schilling 52dd27892b
Use the event dispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 12:07:59 +01:00
Joas Schilling 07f6747305
Move the methods into a new class
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 12:07:58 +01:00
Vincent Petry 6a4ea2c15a
Upload autorename on client side
Removes the need for POST to collection which would hit against upload
limits.

The client tries to auto rename the file by adding a suffix "(2)".
It tries to use the file list on the client side to guess a
suitable name. In case a file still cannot be uploaded and creates a
conflict, which can happen when the file was concurrently uploaded, the
logic will continue increasing the suffix.
2016-11-02 22:15:03 +01:00
Robin Appelman 3692769b0a
Add getShareTypesInFolder to optimize folder listening
Signed-off-by: Robin Appelman <icewind@owncloud.com>
2016-10-31 15:55:40 +01:00
Morris Jobke cde7f535bd Merge pull request #1738 from nextcloud/comments-provide-displaynames-with-mentions
comment mentions: show displayname not uid
2016-10-26 14:02:49 +02:00
Thomas Müller 9df3869bfc
Fix unit tests for BlockLegacyClientPlugin 2016-10-25 18:03:10 +02:00
Vincent Petry c68e273664
Goodbye Iframe transport !
Not needed any more in IE >= 11

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02:00
Vincent Petry 59c5be1cc5
Use Webdav PUT for uploads in the web browser
- uses PUT method with jquery.fileupload for regular and public file
  lists
- for IE and browsers that don't support it, use POST with iframe
  transport
- implemented Sabre plugin to handle iframe transport and redirect the
  embedded PUT request to the proper handler
- added RFC5995 POST to file collection with "add-member" property to
  make it possible to auto-rename conflicting file names
- remove obsolete ajax/upload.php and obsolete ajax routes

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02:00
Lukas Reschke 169e889890
Add unit test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-22 14:05:53 +02:00
Morris Jobke 2b76d14330 Merge pull request #1834 from nextcloud/downstream-26186
Add more files plugins to new DAV endpoint
2016-10-21 09:44:15 +02:00
Vincent Petry 73e216e0a7
Add more files plugins to new DAV endpoint (#26186)
* Add more files plugins to new DAV endpoint

Also fix report plugin to properly retrieve the path from the
prolongated URL

* In case the report is not for this plugin -> simply return to allow other plugins to get executed

* Adjust onReport tests to match new behavior
2016-10-20 21:36:15 +02:00
Joas Schilling 246bb9f33d
Move OC\Files\Storage\Shared to the right namespace 2016-10-20 20:27:44 +02:00
Morris Jobke 98c8464564 Merge pull request #1821 from nextcloud/downstream-26366
Code style changes from downstream
2016-10-20 20:18:47 +02:00
Lukas Reschke 0864f53675 Merge pull request #1796 from nextcloud/oc_fav-report
Make it possible to filter by tags with REPORT method
2016-10-20 18:32:51 +02:00
Thomas Müller 08d6884107
Sanitize length headers when validating quota 2016-10-20 15:15:48 +02:00
Vincent Petry 361f008c70
Make it possible to filter by tags with REPORT method
Enhanced the REPORT method on the Webdav endpoint and added a
"oc:favorite" filter rule. When set, it will return a flat list of
results filtered with only favorite files.

The web UI was also adjusted to use this REPORT method instead of the
private API endpoint.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-19 11:06:29 +02:00
Joas Schilling 05223a39f9
Make sure we only use numbers as length
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-19 09:28:54 +02:00
Arthur Schiwon 5d98ab83e9
resolve displayname via manager and registerable resolvers
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:34:00 +02:00
Arthur Schiwon fea3e20a80
move mention extraction to (I)Comment and report mentions via DAV
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:33:55 +02:00
Thomas Müller 5cd90d4116
[9.2] Sync deathdate and anniversary to birthday calendar (#25655)
* Sync deathdate and anniversary to birthday calendar (which should be renamed maybe)

* Sync deathdate and anniversary to birthday calendar (which should be renamed maybe)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-14 10:12:43 +02:00
Joas Schilling 7dd952d5a2
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 14:20:02 +02:00
Morris Jobke ff3e8c2139 Merge pull request #1518 from nextcloud/dav-fileshome-directory-properties
FilesHome now also returns DAV properties
2016-10-06 00:21:44 +02:00
Morris Jobke 85301df817 Merge pull request #1513 from nextcloud/fix-etag-on-move
Return ETag and OC-ETag in case of a move (#25683)
2016-09-28 21:46:51 +02:00
Morris Jobke ef0760f84f Merge pull request #1545 from nextcloud/delete-calendars-with-their-users
Delete calendars with their users
2016-09-28 21:42:55 +02:00
Thomas Müller bd96c6aa38
Return ETag and OC-ETag in case of a move (#25683)
Downstreaming of https://github.com/owncloud/core/pull/25683

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-28 21:12:50 +02:00
Thomas Citharel 6c8bcb38f1
Rename deleteAllSharesForUser() to deleteAllSharesByUser()
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2016-09-28 15:32:03 +02:00
Lukas Reschke 479c427f2a
Add IL10N to unit test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 21:12:37 +02:00
Lukas Reschke 06e969cb74 Merge pull request #1197 from nextcloud/oc-public-sharing
CalDAV calendar public sharing
2016-09-27 18:51:40 +02:00
Thomas Citharel da1543eef7
fix deletion of calendars
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 18:33:56 +02:00
Thomas Citharel 5215833fe4
delete shares to an user
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 18:30:19 +02:00
Thomas Müller 97a47f49a1
Adjust delete logic and ann unit tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 18:30:10 +02:00
Lukas Reschke 4f4286932f Merge pull request #1457 from nextcloud/upstream-fix-birthday-calendar-component
[Upstream] fix birthday calendar component
2016-09-26 13:21:08 +02:00
Thomas Citharel 9c75b00850
fix tests 2016-09-26 11:55:43 +02:00
Thomas Müller d884370844
Use true random string as uri for public calendars - as a result we can no longer return the pre-publish-url 2016-09-26 11:55:42 +02:00
Lukas Reschke 4659e3ab59
Add new constructor args 2016-09-26 11:55:42 +02:00
Lukas Reschke 2fff203c59
Add missing constructor argument 2016-09-26 11:55:42 +02:00
Thomas Citharel ff67cbc6af
Add test for PublicCalendarRoot 2016-09-26 11:55:42 +02:00
Thomas Citharel f0421e1f75
add missing tests 2016-09-26 11:55:41 +02:00
Thomas Citharel 9af2a9ff4d
test serializer 2016-09-26 11:55:40 +02:00
Thomas Citharel 3921385ed3
fix things (indentation, tests, comments, backend custom implementation 2016-09-26 11:55:39 +02:00
Thomas Citharel ebf23778f5
fix unpublishing test 2016-09-26 11:55:38 +02:00
Thomas Citharel de5e212694
fix plugin test 2016-09-26 11:55:38 +02:00
Thomas Citharel 77216e7ca9
a few tests 2016-09-26 11:55:38 +02:00
Thomas Citharel f09c46d166
Fix some tests 2016-09-26 11:55:37 +02:00
Vincent Petry b17e836e45
FilesHome now also returns DAV properties
The files home node must also return DAV properties like etag,
permissions, etc for the clients to work like they did with the old
endpoint.

This fix makes FilesHome extend the Sabre Directory class, this makes
the FilesPlugin and other plugins recognize it as a directory and will
retrieve the matching properties when applicable.

Downstream of https://github.com/owncloud/core/pull/26066

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 11:24:23 +02:00
Joas Schilling 94b0315d7a
Fix more tests 2016-09-20 14:28:17 +02:00
Thomas Müller 6eb1bc55ab
The birthday calendar can only hold VEVENT - refs https://github.com/owncloud/tasks/issues/338 2016-09-20 11:26:09 +02:00
Joas Schilling 1944d9b3ab
Use magic DI 2016-09-20 01:15:24 +02:00
Lukas Reschke c0656fb4ef
Move Travis tests to DroneCI
Should give us some quicker test execution speed as we're not limited by Travis

Explicitly invoke with "bash"

Install instance already

Use newest litmus container
2016-09-13 18:17:15 +02:00
Vincent Petry 1ab472b9ad
Improve chunk upload AssemblyStream performance 2016-09-13 09:29:02 +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
Joas Schilling b94a4df592
Fix tests 2016-09-07 18:39:48 +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 a123fe6f18
Add a unit test for all the magic 2016-08-30 12:24:20 +02:00
Markus Goetz 0cb34c2fa5
[master] DAV: Return data-fingerprint always when asked (#25482)
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
2016-08-29 14:37:14 +02:00
Joas Schilling 89c78bbce4 Merge pull request #1031 from nextcloud/2fa-infinite-redirect-loop
prevent infinite redirect loops if the there is no 2fa provider to pass
2016-08-26 16:03:05 +02:00
Christoph Wurst 6af2efb679
prevent infinite redirect loops if the there is no 2fa provider to pass
This fixes infinite loops that are caused whenever a user is about to solve a 2FA
challenge, but the provider app is disabled at the same time. Since the session
value usually indicates that the challenge needs to be solved before we grant access
we have to remove that value instead in this special case.
2016-08-24 10:49:23 +02:00
Joas Schilling 3fbb5de74f
Better displaynames for shared address books 2016-08-24 08:50:25 +02:00
Joas Schilling 53182fb780
Better displaynames for shared calendars 2016-08-24 08:50:25 +02:00
Thomas Müller f960aec5bb
Move over to new CalDAVTester repo (#25859)
* Move over to new caldac tester repo

* no run.py anymore
2016-08-19 10:18:59 +02:00
Robin Appelman 1fef5d3d06 add dav property to check if a file has a preview available 2016-07-27 12:59:39 +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
Lukas Reschke ba4f12baa0
Implement brute force protection
Class Throttler implements the bruteforce protection for security actions in
Nextcloud.

It is working by logging invalid login attempts to the database and slowing
down all login attempts from the same subnet. The max delay is 30 seconds and
the starting delay are 200 milliseconds. (after the first failed login)
2016-07-20 22:08:56 +02:00
Joas Schilling 54708f97a1
Fix non-existing exception class 2016-07-18 10:26:42 +02:00
Joas Schilling 8e13ff2c86
Fix TODO and bring in abstraction (similar to comments) 2016-07-18 10:26:36 +02:00
Roeland Jago Douma 2fcb24166f
Fix PHPUnit 5.4 warnings in DAV app
* getMock is deprecated
2016-07-15 09:52:46 +02:00
Robin Appelman 6da066e7be
Fix test using private propertries 2016-07-08 12:36:25 +02:00
Morris Jobke ba16fd0d33 Merge branch 'master' into sync-master 2016-07-07 11:29:46 +02:00
Thomas Pulzer 90b7f74da7 Changed name of default logfile from owncloud.log to nextcloud.log. 2016-07-04 11:50:32 +02:00
Thomas Citharel 7d95cde37d Add all properties while creating a subscription (#25318)
Fixes #24469
2016-07-01 13:42:35 +02:00
Lukas Reschke 179a355b2c Merge remote-tracking branch 'upstream/master' into master-sync-upstream 2016-07-01 11:36:35 +02:00
Lukas Reschke 149218ead9 Fix tests 2016-06-30 13:46:08 +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
Bjoern Schiessle 5f6944954b get only vcard which match both the address book id and the vcard uri 2016-06-28 16:11:06 +02:00
Georg Ehrke 3c399be6ec fix a ImageExportPlugin Test (#25215) 2016-06-27 21:26:56 +02:00
Vincent Petry 56ad4cdfec
Show error message when posting an invalid comment
When an internal server error occurs while creating or updating a
comment, display a proper error notification in the UI.
2016-06-24 10:17:12 +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
Christoph Wurst 5a8cfab68f
throw PasswordLoginForbidden on DAV 2016-06-17 11:30:24 +02:00
Christoph Wurst 82b50d126c
add PasswordLoginForbiddenException 2016-06-17 11:02:07 +02:00
Christoph Wurst 465807490d
create session token only for clients that support cookies 2016-06-13 19:44:05 +02:00
Vincent Petry 68c3b23e04 Merge pull request #24080 from owncloud/support-calendar-class-property
Extract CLASS property from calendar object and store it in the database
2016-06-10 11:22:11 +02:00
Vincent Petry 1399e87d57
DAV now returns file name with Content-Disposition header
Fixes issue where Chrome would append ".txt" to XML files when
downloaded in the web UI
2016-06-09 15:51:41 +02:00
Thomas Müller bfcd1dc49c
Filter confidential calendar objects in shared calendars
Filter private calendar objects in shared calendars
2016-06-09 11:09:14 +02:00
Thomas Müller 082f456b8b
Added unit testing for the migration step 2016-06-09 11:09:14 +02:00
Thomas Müller fbdec59f22
Extract CLASS property from calendar object and store it in the database 2016-06-09 11:09:13 +02:00
Vincent Petry bf917d7063 Merge pull request #24813 from owncloud/delete-ghost-files
allow deleting "ghost files" trough the View and Node api
2016-06-07 09:34:16 +02:00
Thomas Müller 371a07e3ab Fix checkMove() implementation for dav v2 - fixes #24776 (#24971) 2016-06-06 17:01:27 +02:00
Robin Appelman 3bd5073251 add test for deleting ghost files over dav 2016-06-03 13:37:52 +02:00
Christoph Wurst da03a85c3c
block DAV if 2FA challenge needs to be solved first 2016-06-01 10:42:38 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Joas Schilling 5882e21b3b
Update DAV unit tests to PSR-4 2016-05-25 16:09:18 +02:00
Joas Schilling 42ba61db04
Fix local execution 2016-05-25 16:09:18 +02:00
Christoph Wurst 28ce7dd262
do not allow client password logins if token auth is enforced or 2FA is enabled 2016-05-24 17:54:02 +02:00
Christoph Wurst ad10485cec
when generating browser/device token, save the login name for later password checks 2016-05-24 11:49:15 +02:00