Commit Graph

567 Commits

Author SHA1 Message Date
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
Lukas Reschke c268ad1597
Add PHP unit test 2016-06-09 18:29:13 +02:00
Bjoern Schiessle bb54ab0db8
add hide file list option 2016-06-09 15:15:17 +02:00
Roeland Jago Douma 72c5535492
Extend unit tests 2016-06-07 15:09:26 +02:00
Roeland Jago Douma 2e2ece753f
Fix unit tests 2016-06-07 15:09:25 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Joas Schilling 3f0b2d148d
Move tests to PSR-4 2016-05-25 15:00:00 +02:00
Joas Schilling 5001036fd4
Move classes from outside lib/ to PSR-4 2016-05-25 14:59:59 +02:00
Joas Schilling 25f3110730 Fix ShareControllerTest (#24824) 2016-05-25 10:21:07 +02:00
Björn Schießle 7b25839bd5
use share initiator as fall back to access the file
in case of federated re-shares the owner can be a remote user.
Therefore we can't always use to owner to access the local file
2016-05-20 21:15:15 +02:00
Björn Schießle 5a1641bed2
move request handler for federated shares to the federated sharing app 2016-05-20 21:15:08 +02:00
Joas Schilling 320b1c3abf
Fix more failures 2016-05-19 10:11:42 +02:00
Roeland Douma 5c9103287f Group fixup (#24621)
* Move used OC_Group_xx to \OC\Group

* Add (deprecated) legacy wrapper in legacy, OC_Group_xx

* Replace deprecated use of OC_Group_xx with \OC\Group\xx
2016-05-17 16:06:44 +02:00
Roeland Jago Douma 8bfa532075
Fix test race condition
E-tag propagation replies on the mtime of the file. Order of events:

1. add file 'foo.txt' with content 'bar'
2. Set mtime to now() - 1
3. Check if etag changed.

Now this goes right often when 1 and 2 happen in the same second.
However imagine

1. add file 'foo.txt' with content 'bar' (at t=0.999)
2. Set mtime to now() - 1 (at t=1.001)

Now the mtime will be set to the same time. Thus not chaning the etag.
2016-05-11 14:07:37 +02:00
Roeland Jago Douma 62bc53143e
Add locking to modifying operation of the OCS Share API
Fixes #17243

This is done in the OCS Share API instead of the share manager since we
want lazy shares in general. However when doing modifying calls via the
OCS Share API it is fine to force real nodes.

* Updated unit tests to work with logging
2016-04-30 10:32:35 +02:00
Thomas Müller 887045b790 Merge pull request #24027 from owncloud/translate_ocs_share
Translate OCS Share API error messages
2016-04-26 14:42:18 +02:00
Roeland Jago Douma 5e9b618604
Translate OCS Share API error messages
For https://github.com/owncloud/core/issues/22209
2016-04-25 11:08:48 +02:00
Björn Schießle 74de72e75e Merge pull request #24073 from owncloud/move_federated_sharing_settings_to_app
move federated sharing settings to the federatedfilesharing app
2016-04-25 10:19:46 +02:00
Björn Schießle e10105474f
move federated sharing settings to the federatedfilesharing app 2016-04-22 14:55:40 +02:00
Robin Appelman b7867e9368 Add unit tests for shared size propagation with encryption 2016-04-21 13:13:18 +02:00
Thomas Müller cd01c440a0 Merge pull request #23919 from owncloud/cyclyc-share-dep-example
SharedStorage to new sharing code + cleanup
2016-04-20 20:37:27 +02:00
Roeland Jago Douma dd7e0d13e5
Move the group dummy backend to test
The dummy backend is only used for testing and should thus reside in
tests.
2016-04-19 15:13:31 +02:00
Roeland Jago Douma 92abb5f23d
Fix tests 2016-04-19 14:04:00 +02:00
Stefan Weil 16df1c5188 apps: Fix typos (found by codespell) (#23862)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-12 12:52:51 +02:00
Roeland Jago Douma db0c3bd535
Fix Share20OCSTest 2016-04-08 15:22:49 +02:00
Roeland Jago Douma db5ea95e29 Add capability to show if group sharing is enabled
fixes #23477

Now clients can correct wording to properly reflect who a user can share
with.
2016-04-04 19:35:01 +02:00
Vincent Petry a9aa39efbf Fix displaying owner before share icon in file list
Initial display of owner was missing
2016-03-30 18:09:02 +02:00
Thomas Müller d5be21fe81 Merge pull request #23398 from owncloud/block_group_sharing
Allow blocking of group sharing
2016-03-22 21:28:13 +01:00
Roeland Jago Douma 00f48ec37b When the Share API is disabled do not return shares
Fixes #22668

Block everything in the OCS Share API
2016-03-22 19:43:23 +01:00
Roeland Jago Douma e69a09756b Respect disabled group sharing in sharee endpoint
* Fix tests
2016-03-22 17:13:34 +01:00
Roeland Jago Douma 52826d0e24 Block group sharing in API and in share manager
* Fix tests
2016-03-22 17:13:34 +01:00
Vincent Petry f778e48ee5 Add webdav property for share info in PROPFIND response 2016-03-17 15:35:21 +01:00
Robin Appelman 7d42bdfde0 Specify the target user when unsharing a federated share 2016-03-14 14:34:05 +01:00
Roeland Jago Douma 6509220f82 Fix intergration tests 2016-03-13 13:31:28 +01:00
Roeland Jago Douma 517ef52560 Add mimetype to OCS Share API output
Fixes #23044
2016-03-10 15:41:17 +01:00
Lukas Reschke c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Thomas Müller 5fe5233f41 Merge pull request #22681 from owncloud/add-autodiscovery-for-ocs
Add autodiscovery support to server-to-server sharing implementation
2016-03-01 11:27:28 +01:00
Thomas Müller 73e145cf63 Merge pull request #22728 from owncloud/external-share-testremote
use ocs discover endpoint to test remote
2016-03-01 11:27:07 +01:00
Lukas Reschke 8f95d69954 Fix tests 2016-03-01 07:01:52 +01:00
Roeland Jago Douma 8924b0a0dc Check correct permissions when resharing
Fixes #22675

Since we only get a share id we do not know the path for the sharer.
Now if we edit a share we start searching for shares for that user of
that node. And deduce the permissions that way.

* Intergration test added
* Fix unit tests
2016-02-29 19:30:14 +01:00
Thomas Müller 66536f912e Merge pull request #22640 from owncloud/fix_22587
Remove delete permissions for read-only federated reshares
2016-02-26 10:48:07 +01:00
Lukas Reschke 59028cced0 Add autodiscovery support to server-to-server sharing
Adds autodiscovery support to server-to-server sharing as specified in the specification. If no discovery data is found it is using the fallback ownCloud endpoints for legacy support.
2016-02-26 09:26:55 +01:00
Roeland Jago Douma 92cff0984d Make file actions use icon CSS classes
This makes theming of file actions possible
2016-02-25 22:49:52 +01:00
Roeland Jago Douma 0c9c7737b4 Remove delete permissions for read-only federated reshares
An incomming federated share is just a mount point. Therefor if we
request the permissions on the mountpoint DELETE permissions will be
returned (among others). Since we can always remove a mountpoint, update
a mount point.

However now when trying to reshare we will try to reshare with DELETE
permissions. Which is false.

This PR removes the delete permissions if it is a shared storage.

Basically a quick hack.
Fixes #22587
2016-02-25 12:19:38 +01:00
Roeland Jago Douma 670557ffbb Add unit tests for formatShare 2016-02-17 13:55:39 +01:00
Roeland Jago Douma 2aa0b885f6 OCS Share API should not return invalid shares
Since we have lazy shares it can happen that a share is actually
invalid. See https://github.com/owncloud/core/issues/20908

This add checks for the get methods to handle the NotFound exception.
2016-02-17 13:55:39 +01:00
Thomas Müller 11707dffce Merge pull request #22351 from owncloud/fix_22277
show remote server on federated share auto-complete
2016-02-13 18:25:04 +01:00
Bjoern Schiessle 11abf2487c add remote server to the result 2016-02-12 15:52:51 +01:00
Roeland Jago Douma 745bfda41f Fix migration step to avoind invisible shares 2016-02-11 13:29:23 +01:00
Roeland Jago Douma 0284c60c3a Add tests 2016-02-11 13:29:23 +01:00
Vincent Petry f79fafcf06 Revert back to non-webdav download link for public URLs
Fixes issues with browsers not happy with the token.
Fixes activities which were not sent.
2016-02-10 19:09:52 +01:00
Robin Appelman acd8c72d3d add tests 2016-02-09 15:03:00 +01:00
Roeland Jago Douma 359c62d90e Fix unit tests 2016-02-09 15:03:00 +01:00
Roeland Jago Douma 623a0e4637 Example hook check 2016-02-09 10:36:44 +01:00
Roeland Jago Douma 38cbfed476 Fix unit test 2016-02-09 10:20:25 +01:00
Thomas Müller 698a6b07a8 Merge pull request #22206 from owncloud/share2_migration_with_federated
Update the migration step to include federated shares
2016-02-08 17:58:26 +01:00
Roeland Jago Douma 3c4e511792 Update the migration step to include federated shares
Now federated shares will also be updated to the flat
reshare model.
2016-02-08 15:11:48 +01:00
Roeland Jago Douma a506f9ca3f Respect not allowing outgoing shares 2016-02-08 11:30:48 +01:00
Roeland Jago Douma bec1de8a38 Update OCS Share API to use federated share provider 2016-02-08 11:30:48 +01:00
Roeland Jago Douma ca32778975 Even single shares are returned as array
When fetching a single share using ../shares/<ID> we should still return
an array of shares.

Fixes #22189
2016-02-08 10:11:22 +01:00
Roeland Jago Douma 453ea6698d [Share 2.0] Fix public link sharing 2016-02-03 19:25:29 +01:00
Roeland Jago Douma c1841892d0 [Share 2.0] Fix OCS endpoint 2016-02-03 19:25:29 +01:00