Commit Graph

443 Commits

Author SHA1 Message Date
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
Thomas Müller e34ec0a138 Merge pull request #22095 from owncloud/public_link_with_port
Public link downloads should work on instance on non default port
2016-02-03 16:06:54 +01:00
Roeland Jago Douma 4bb96a5553 Construct valid URL 2016-02-03 11:29:36 +01:00
Roeland Jago Douma dc32f49c6e [Share 2.0] Use GenericShareException 2016-02-02 14:23:45 +01:00
Roeland Jago Douma 4d7130ad31 [Share 2.0] Add exceptions to OCP 2016-02-02 14:07:11 +01:00
Roeland Jago Douma 6151a0540b Update the initiator of the share as well in migration 2016-01-28 19:24:23 +01:00
Roeland Jago Douma b85770d636 Update reshares in batches as not to run out of memory 2016-01-28 19:24:23 +01:00
Björn Schießle dc8d43575f upgrade to sharing 2.0, remove hierarchical re-shares 2016-01-28 19:24:23 +01:00
Roeland Jago Douma 2831884e74 Fix OCS unit tests after two share merges
* Use getNode
* Return IShare object so typechecking is happy
2016-01-28 13:17:16 +01:00
Thomas Müller 295de6aad7 Merge pull request #21960 from owncloud/share2_ocs_fix_passing_empty_strings
Share2 ocs fix passing empty strings
2016-01-28 11:58:35 +01:00
Robin Appelman 1369f2c684 cleanup shared cache 2016-01-28 11:46:43 +01:00
Roeland Jago Douma 34e912ab6b [Share 2.0] Fix interfaces and comments
* Made comments more clear
* Removed unneeded methods
* IShares shareTime is now a proper DateTime object
* IShares getPath -> getNode & setPath -> setNode
* Fix unit tests
2016-01-28 07:54:09 +01:00
Roeland Jago Douma 185b9c6edd [Share 2.0] Move IShare to OCP 2016-01-27 22:04:37 +01:00
Roeland Jago Douma 6957917b20 [Share 2.0] Allow using permissions to update link share 2016-01-27 20:36:36 +01:00
Roeland Jago Douma f5c45dfe7b [Share 2.0] Still allow isolated updates
Still allow isolated updates of parameters
2016-01-27 20:36:31 +01:00
Roeland Jago Douma b321ceef60 [Share 2.0] Also handle empty parameter in updateShare
* More sanity checks
* More unit tests
2016-01-27 20:34:06 +01:00
Roeland Jago Douma 35a3432793 [Share 2.0] When passing empty strings don't fail
The password and expiration date can be set to empty strings when
created. This is now handled gracefully.
2016-01-27 20:34:06 +01:00
Joas Schilling d46cd6a245 Fix tests 2016-01-26 14:02:32 +01:00
Roeland Jago Douma 18421e7e68 Directly get from the server container
* Updated unit tests
2016-01-20 21:12:26 +01:00
Roeland Jago Douma 8734ebe505 [Share 2.0] Make link share download use share manager 2016-01-20 21:12:26 +01:00
Roeland Jago Douma 717697313b [Share 2.0] Move tests over the sharemanager
Nice side effect... pure unit tests!
2016-01-20 21:12:26 +01:00
Roeland Jago Douma d33e578665 [Share 2.0] Add share owner information to OCS Share API 2016-01-15 20:21:47 +01:00
Robin Appelman 5d0451b848 Safe teardowns 2016-01-14 12:54:42 +01:00
Roeland Jago Douma cbd3050f4c [Share 2.0] Use full share id (providerId:shareId)
Now that we support multiple managers we communicate shares to the
outside as 'providerId:shareId'. This makes sures that id's are unique
when references from the OCS API.

However, since we do not want to break the OCS API v1 we need to
somewhat hack around this.

When we switch to OCS API v2 (which we should when we support more
custom providers). We will change the id to always be the fullShareId.
2016-01-13 16:35:15 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00