Commit Graph

529 Commits

Author SHA1 Message Date
Roeland Jago Douma ea07bbc562
Move Share20OCS to ShareAPIController
It was already a controller just still residing in its old location.

* Moved ShareAPIController to user plain userID instead of user object
* Moved Share20OCS to ShareAPIController
* Removed initisation of class from Application.php and leave it to the
AppFramework
* Fixed tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 09:52:34 +02:00
Roeland Jago Douma 7792902808
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-21 21:43:15 +02:00
Thomas Müller e0d919bbfc
Adding Open Graph Support for public shares http://ogp.me/
In case no preview is available we display the ownCloud logo

Fix unit test
2016-10-21 21:42:40 +02:00
Morris Jobke 2799b0a821 Merge pull request #1835 from nextcloud/downstream-24948
Move OC\Files\Storage\Shared to the right namespace
2016-10-20 23:48:15 +02:00
Joas Schilling 246bb9f33d
Move OC\Files\Storage\Shared to the right namespace 2016-10-20 20:27:44 +02:00
Vincent Petry d4976e5554
Fix post_unshareFromSelf hook parameter format
When unsharing from self in a group share situation, the share items
passed to the post_unshareFromSelf hook were using the wrong format in
which the attribute names (ex: "share_type") have non camel-case format.

This fix makes sure that in group sharing case we use the correct
format. It looks like the code was already producing it but in
array_merge it was not using it and adding the unprocessed one.
2016-10-20 16:09:08 +02:00
Robin Appelman ab10a54836
remove duplicate trait
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:38 +02:00
Robin Appelman 7d1e800c15
fix share tests not passing path
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:36 +02:00
Robin Appelman 3845d4ec9a
more robust test setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:34 +02:00
Robin Appelman 7ce68ce6ac
phpunit is weird
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:34 +02:00
Lukas Reschke a1f5364d7f
Generate coverage for quick DB tests
This adds the "QUICKDB" group which excludes some tests that abuse unit tests as integration tests as displayed in https://github.com/nextcloud/server/issues/1626

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-05 13:55:44 +02:00
Lukas Reschke 498b7399c1
Inject IHTTPClientService
Otherwise the unit test execution will do a ton of external HTTP requests which fail and then timeout…

See https://blackfire.io/profiles/compare/3c67acfa-a11e-4aec-bcd4-c945b006f01e/graph for reference

Pretty similar to https://github.com/nextcloud/server/pull/1565

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-29 00:26:20 +02:00
Vincent Petry 118c9d58fe
Fix fed share test call to return proper result
Fixes an issue where retrying a previously failed federated share would
not properly reset the availability flag because the return value was
undefined instead of "true".
2016-09-20 12:11:26 +02:00
Roeland Jago Douma 56d37e27bc
Fix tests 2016-09-13 09:40:59 +02:00
Vincent Petry fb52b1af67
Allow increasing permissions for share owner
In some cases, the owner of the share is also recipient through a group
share. The owner must still be able to increase permissions in that
situation.
2016-09-13 09:40:59 +02:00
Morris Jobke c16aefcff5 Merge pull request #1317 from nextcloud/add-sharing-disclaimer
Adding a optional disclaimer to the anonymous upload page
2016-09-08 21:18:28 +02:00
Lukas Reschke 268c5a0aa0
Adjust test 2016-09-08 20:34:04 +02:00
Robin Appelman e8e950a4d2
more efficient querying of numeric storage ids 2016-09-07 17:22:40 +02:00
Roeland Jago Douma c629761fea
Fix getMock files_sharing 2016-09-06 09:29:27 +02:00
Vincent Petry ec9fd67bc5
Allow space for federated share id search 2016-08-30 11:11:59 +02:00
Roeland Jago Douma 2fdda01b4b
Sharee API to AppFramework
* Move to OCSController
* Move to Controller folder
* Use automatic DI
* Use function parameters
* Updated tests
2016-08-26 11:36:09 +02:00
Roeland Jago Douma cae87d028d
Fix tests 2016-08-24 21:30:42 +02:00
Roeland Jago Douma fda4241dfb
Cleanup Tests 2016-08-17 20:45:29 +02:00
Roeland Jago Douma af074eb2b7
Move updateShare and getShares over to use proper parameters
* Update tests
2016-08-17 20:45:29 +02:00
Roeland Jago Douma 22e23f3045
Use parameters in createShare
* Fix tests
2016-08-17 20:45:27 +02:00
Roeland Jago Douma 9daf41e05a
Add files drop capability for clients 2016-08-13 14:02:09 +02:00
Roeland Jago Douma 4006763f5b
Move the Share20OCS code over to use the proper DataResponse 2016-08-10 12:40:32 +02:00
Lukas Reschke 70eef2a82e Merge pull request #445 from nextcloud/ocs_share_to_appframework
OCS Share API to appframework
2016-08-08 14:59:59 +02:00
Roeland Jago Douma 0556e40d3e
Fix tests 2016-08-05 14:17:32 +02:00
Roeland Jago Douma d9418c105e
Add OCSShareAPIMiddleware tests 2016-08-05 14:17:32 +02:00
Joas Schilling f37fa6e45c
Move Share backends to PSR-4 instead of using class path (#24941) 2016-08-05 14:13:41 +02:00
Vincent Petry 2404f6a5a7
Make share target consistent when grouping group share with user share
In some situations, a group share is created before a user share, and
the recipient renamed the received share before the latter is created.
In this situation, the "file_target" was already modified and the second
created share must align to the already renamed share.

To achieve this, the MountProvider now groups only by "item_source"
value and sorts by share time. This makes it so that the least recent
share is selected as super-share and its "file_target" value is then
adjusted in all grouped shares.

This fixes the issue where this situation would have different
"file_target" values resulting in two shared folders appearing instead
of one.
2016-08-03 10:16:28 +02:00
Vincent Petry 0bddaa23b0
Added more tests for sharing's MountProvider 2016-08-03 10:16:28 +02:00
Vincent Petry 714d7ec936
Improved share grouping readability + fixed test 2016-08-03 10:16:28 +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
Roeland Jago Douma 1c5e082ee1
Add eventdispatcher to public link view 2016-07-18 13:35:35 +02:00
Morris Jobke 40328114f9 Merge pull request #379 from nextcloud/create_federated_share_on_mount
Create federated share on mount
2016-07-18 09:22:48 +02:00
Roeland Jago Douma db559e33be
Fix PHPUnit 5.4 warnings in files_sharing tests 2016-07-15 12:22:53 +02:00
Bjoern Schiessle 5bbba490c4
move some stuff over to the federatedfilesharing app 2016-07-14 16:39:48 +02:00
Morris Jobke beae00a5e5 Simplify test code and don't show anything if no date is set 2016-07-07 15:10:04 +02:00
Morris Jobke 43b26b9506 add unit tests 2016-07-07 15:10:04 +02:00
Morris Jobke ba16fd0d33 Merge branch 'master' into sync-master 2016-07-07 11:29:46 +02:00
Thomas Müller d2d99a91a0 fix swift primary object store test (#25281)
* Wait for socket to be open

* Fix call on null

* Allow DB access for MountProviderTest

Makes unit tests pass when using object store, since their FS access is
actually oc_filecache DB access. It is currently not possible to mock
or bypass the logic from "SharedMount::verifyMountPoint()" triggered by
this test.
2016-07-05 08:54:51 +02:00
Lukas Reschke 6670d37658 Merge remote-tracking branch 'upstream/master' into master-sync-upstream 2016-06-27 18:23:00 +02:00
Lukas Reschke 7a9d60d87e
Merge remote-tracking branch 'upstream/master' into master-upstream-sync 2016-06-26 12:55:05 +02:00
Vincent Petry 955635c7aa Add explicit delete permission to link shares
Link shares always allowed deletion, however internally the permissions
were stored as 7 which lacked delete permissions. This created an
inconsistency in the Webdav permissions.

This fix makes sure we include delete permissions in the share
permissions, which now become 15.

In case a client is still passing 7 for legacy reasons, it gets
converted automatically to 15.
2016-06-24 09:48:48 +02:00
Thomas Müller f2f1eab7f4 fix broken unit test (#25198) 2016-06-21 13:55:11 +02:00
Vincent Petry ca168265ef Filter out group shares for owner where owner is included (#25190) 2016-06-21 11:36:28 +02:00
Arthur Schiwon 42c66efea5
Merge branch 'master' of https://github.com/owncloud/core into downstream-160611 2016-06-11 15:34:43 +02:00