Commit graph

159 commits

Author SHA1 Message Date
Roeland Jago Douma
8a652d1238
Unlock before all returns 2016-04-30 11:34:06 +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
e10105474f
move federated sharing settings to the federatedfilesharing app 2016-04-22 14:55:40 +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
Thomas Müller
8fb3e44610 Merge pull request #23287 from owncloud/issue-22786-absolute-paths
Fix absolute path creation for remote shares with /oc webroot
2016-03-17 14:29:57 +01:00
Joas Schilling
140d5f7df3 Make sure to append the web root as per doc 2016-03-16 09:37:48 +01:00
Robin Appelman
7d42bdfde0 Specify the target user when unsharing a federated share 2016-03-14 14:34:05 +01:00
Thomas Müller
101e446577 Merge pull request #23091 from owncloud/issue-23085-csae-insensitive-group-search
Return the correct group casing in sharee api
2016-03-13 19:51:07 +01:00
Roeland Jago Douma
4b1fe0083a Remove the old OCS Share API code 2016-03-13 13:31:28 +01:00
Joas Schilling
aad8aa0970 Correctly lower the search input as well 2016-03-11 14:08:13 +01:00
Joas Schilling
8cd52ed36d Return the correct group casing in sharee api 2016-03-11 14:08:12 +01:00
Thomas Müller
b502667f3a Merge pull request #23121 from owncloud/scrutinizer_share_fixes
Fix some scrutinizer warning in the sharing code
2016-03-10 22:17:06 +01:00
Roeland Jago Douma
e6712c47a6 Fix some scrutinizer warning in the sharing code
* Better phpdoc
* Promper use statements
* Unused parameter
2016-03-10 21:35:22 +01:00
Roeland Jago Douma
517ef52560 Add mimetype to OCS Share API output
Fixes #23044
2016-03-10 15:41:17 +01:00
Roeland Jago Douma
b1dae2a4b9 Can't convert node to string 2016-03-07 16:15:01 +01:00
Roeland Jago Douma
218d042142 Move common code to function
The code to get a share by id is somewhat messy. And was duplicated.
Now this is done is a separate function
2016-03-07 16:14:57 +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
Roeland Jago Douma
ffce4fc6a9 For now only allow 1 link share per file/folder
Fixes #22692
This is a temp fix util we get #22327

We just block it in the OCS Share API since we have 1 endpoint now
anyway.
2016-03-01 08:25:40 +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
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
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
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
46b39c3465 Merge pull request #22337 from owncloud/new_reshare_no_initiator
On backend hickups don't crash OCS output
2016-02-15 12:02:52 +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
479c458428 The owner and recipient can also be null
If we have backend hickups it can be that we are unable to retrive the
owner and recipient user as well. In such cases just return the UID.
2016-02-12 10:45:33 +01:00
Roeland Jago Douma
0a33cdee0c If the initiator no longer exists return UID
It can happen that the share initiator is deleted. Because of the new
resharing behaviour this share then still exists. We just can fetch the
displayname properly.
2016-02-12 10:45:33 +01:00
Joas Schilling
31c9e047a8 Delete the notification when the owner unshares the remote before the user did anything 2016-02-11 10:41:55 +01:00
Joas Schilling
2263b8b693 Remove the notification if accepting/declining failed because of 404 2016-02-11 10:41:55 +01:00
Joas Schilling
fa893762a2 Fix oracle by using less quotes 2016-02-10 08:40:45 +01:00
Joas Schilling
c769f5775d Create the actions with the correct ID 2016-02-10 08:40:45 +01:00
Joas Schilling
31cf3b8288 Make sure the share ID is an integer 2016-02-10 08:40:45 +01:00
Joas Schilling
cb8024ca14 Fix action paths 2016-02-10 08:40:45 +01:00
Joas Schilling
a4a7cf40a1 Fix the notification API usage 2016-02-10 08:40:45 +01:00
Joas Schilling
3ff88c8c84 Revert "Disable the remote sharing notifications until they work properly"
This reverts commit 6bc93c7401.

Conflicts:
	apps/files_sharing/lib/external/manager.php
2016-02-10 08:40:44 +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
c1841892d0 [Share 2.0] Fix OCS endpoint 2016-02-03 19:25:29 +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
Thomas Müller
dfb88612af Filter contacts from the local system addressbook - remote share with local users is not allowed 2016-02-02 11:24:26 +01:00
Thomas Müller
847b1e3af0 In some cases $contact['CLOUD'] is not an array 2016-02-02 10:56:33 +01:00
Roeland Jago Douma
a24e7f6558 Add path filter to OCS Share API ?shared_with_me=true
This allows all clients to quickly get the share info for a given path.
Instead of returning everything and filtering it then manually on the
client side.
2016-01-29 15:36:23 +01:00