Commit Graph

80 Commits

Author SHA1 Message Date
Thomas Müller 207c09c511 Merge pull request #22309 from owncloud/infinite-recursion-on-expired-link
Do not getShare in deleteShare, it's already there when deleting
2016-02-12 11:11:26 +01:00
Roeland Jago Douma 4533cb9c59 Add parent for invisible link shares 2016-02-11 13:29:23 +01:00
Roeland Jago Douma dd630e33ea Properly check for legacy methods
The new shares are completely without parents eventually. But for some
current legacy reasons the methods are still around. But we should
properly check for them.

Fixes #22309
2016-02-11 11:30:52 +01:00
Joas Schilling ee080a9bc3 Do not getShare in deleteShare, it's already there when deleting 2016-02-11 11:21:06 +01:00
Thomas Müller 29f6f451a9 Merge pull request #22192 from owncloud/fix_19685
Only set the default expiration date on share creation
2016-02-09 23:38:00 +01:00
Roeland Jago Douma 49726470ab Catch exception 2016-02-09 11:05:34 +01:00
Roeland Jago Douma 426a12baaa Throw exception 2016-02-09 11:05:29 +01:00
Roeland Jago Douma ee65cd0bd8 Only set the default expiration date on share creation
Fixes #19685

The default expiration date should only be set when we create a new
share. So if a share is created and the expiration date is unset. And
after that the password is updated the expiration date should remain
unset.
2016-02-09 11:05:14 +01:00
Roeland Jago Douma 12afd7b005 Move password update hook after update 2016-02-09 10:38:12 +01:00
Roeland Jago Douma 623a0e4637 Example hook check 2016-02-09 10:36:44 +01:00
Arthur Schiwon 4dfd56ee81 add post hook on link-share password change 2016-02-08 23:27:37 +01:00
Roeland Jago Douma a506f9ca3f Respect not allowing outgoing shares 2016-02-08 11:30:48 +01:00
Roeland Jago Douma ba0bab294e Add federated share provider to core 2016-02-08 11:30:48 +01:00
Roeland Jago Douma 46faf6d3ca Fix exception on delete 2016-02-06 13:31:54 +01:00
Roeland Jago Douma 8486d61764 getSharesBy should also expire link shares 2016-02-06 13:31:54 +01:00
Roeland Jago Douma 3028ec5440 Delete expired share when fetched by id 2016-02-06 13:31:54 +01:00
Roeland Jago Douma 5ed56d9edb Delete a link share if it is expired on access
If we access a link share we should check if it has expired already.
If so we should remove it and throw a ShareNotFound exception
2016-02-06 13:31:54 +01:00
Roeland Jago Douma 169874957a Path should be relative 2016-02-04 19:19:10 +01:00
Roeland Jago Douma b57aac0a89 [Share 2.0] Add missing post_update_permissions hook 2016-02-04 19:18:25 +01:00
Roeland Jago Douma 0f22a8db1d Also add type (file/folder) to IShare object
We need this for the hooks :(
2016-02-04 14:28:09 +01:00
Roeland Jago Douma fc215d0980 Make the share object lazy
Share providers can now just pass in a fileId. And the node will only be
created once needed.
2016-02-04 12:51:23 +01:00
Roeland Jago Douma 96662c4d0d [Share 2.0] Fix shareManager 2016-02-03 19:25:29 +01:00
Roeland Jago Douma eb904c7aa9 [Share 2.0] Fix defaultshare provider 2016-02-03 19:25:29 +01:00
Roeland Jago Douma 78be766cf5 [Share 2.0] Use strings for ids
* sharedWith
* sharedBy
* shareOwner

Now all set/get strings with the id. (userId, groupId,
federatedsharerId).

This to avoid a huge amount of if statements
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 ce053b9808 Merge pull request #22013 from owncloud/share2_moveshare
[Share 2.0] Allow moving of shares
2016-02-02 13:34:50 +01:00
Thomas Müller eee6f3d406 Merge pull request #22057 from owncloud/share2_update_hash
Update old password hashed for link shares on access
2016-02-02 12:37:31 +01:00
Roeland Jago Douma 2316cb1f8b [Share 2.0] Allow moving of shares
* Only recipient can move a share
* Unit tests
2016-02-02 11:34:52 +01:00
Roeland Jago Douma df690cd1f2 getChildren should not return usergroup shares 2016-02-02 10:41:57 +01:00
Roeland Jago Douma 403547f0ea [Share 2.0] Allow recipient to be passed in to getShareById
* This allows us to retrieve usergroup shares for a given id.
  If the user deleted a share or moved it this will be a different share
2016-02-02 10:41:57 +01:00
Roeland Jago Douma 619a4d2e52 Update old password hashed for link shares on access
Fixes https://github.com/owncloud/core/issues/16594
2016-02-01 21:46:32 +01:00
Thomas Müller 84d9704121 Merge pull request #22028 from owncloud/share_hook_expirationdate
Share hook expirationdate
2016-02-01 14:13:54 +01:00
Roeland Jago Douma 1efe877d00 Emit hook for expirationDate verification 2016-01-30 15:40:31 +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
Roeland Jago Douma 1ff4ec1cd3 [Share 2.0] When deleting a group share delete children
For group shares we can have children. Those are custom shares when a
user has moved or deleted a group share. Those also have to be deleted
if the group share is removed.
2016-01-28 20:35:46 +01:00
Roeland Jago Douma 8d44e537ac [Share 2.0] Remove setId and setProviderId from the interface
Those should only ever be set by the providers
2016-01-28 07:54:16 +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 357b271cb4 [Share 2.0] Create IManger interface for share manager 2016-01-27 22:04:37 +01:00
Roeland Jago Douma 185b9c6edd [Share 2.0] Move IShare to OCP 2016-01-27 22:04:37 +01:00
Roeland Jago Douma 0832cca54e [Share 2.0] Fix IShare 2016-01-27 22:04:09 +01:00
Thomas Müller 6973718fb8 Merge pull request #21940 from owncloud/share2_do_not_returned_removed_group_shares
[Share 2.0] Properly handle user deleted group shares
2016-01-27 16:16:06 +01:00
Thomas Müller 5b7a1b13f3 Merge pull request #21887 from owncloud/share2_updateShare
[Sharing 2.0] update share
2016-01-27 09:36:41 +01:00
Roeland Jago Douma a4900d721f [Share 2.0] Properly handle user deleted group shares
If a user deletes a group share we create a special share entry. To the
API this is just a normal group share for that user with permissions 0.
But we should not return this.
2016-01-27 09:02:12 +01:00
Roeland Jago Douma d11682dcb4 Fix comments from Thomas 2016-01-26 15:31:52 +01:00
Roeland Jago Douma c090d709e7 We must resolve to the proper usergroup share 2016-01-26 14:14:54 +01:00
Roeland Jago Douma e508bcb7a7 [Share 2.0] Fire off hook 2016-01-26 13:59:58 +01:00
Roeland Jago Douma 46045ecc52 [Share 2.0] Add update share 2016-01-26 13:59:58 +01:00
Joas Schilling 09ae160463 Replace other usages 2016-01-25 17:17:36 +01:00
Roeland Jago Douma a6600e95dc [Share 2.0] Add deleteFromSelf method
This allows recipient to delete a share. For user shares this is the
same as deleting (at least for now).
But for group shares this means creating a new share with type 2. With
permissions set to 0.
2016-01-22 15:06:50 +01:00