Commit Graph

54 Commits

Author SHA1 Message Date
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 2c0cb5a00e Unit test for delete lazy shares 2016-02-04 13:30:42 +01:00
Roeland Jago Douma e0bc128eb5 Add unit tests 2016-02-04 13:05:05 +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 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 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 d3e79f3bb6 Add Unit tests 2016-01-30 15:40:35 +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 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 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 44c073b1e6 [share 2.0] manager unit tests 2016-01-26 13:59:58 +01:00
Roeland Jago Douma 59c2aae54f [Share 2.0] Fix unit tests 2016-01-26 13:59:58 +01:00
Roeland Jago Douma 7239fea0f0 [Share 2.0] Add unit test for the default share provider 2016-01-26 13:59:58 +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
Roeland Jago Douma 9b5ea18ce5 Add Unit tests for the default share provider 2016-01-21 16:06:12 +01:00
Roeland Jago Douma 88bc8634d2 Add Unit tests 2016-01-20 21:56:55 +01:00
Roeland Jago Douma 7a946a05f5 Properly DI the servercontainer 2016-01-20 08:33:36 +01:00
Roeland Jago Douma 0f454ff5aa Use namedparameter 2016-01-14 10:54:40 +01:00
Roeland Jago Douma 4cc2230c58 [Share 2.0] Fix pre_share and post_share hooks 2016-01-13 21:56:04 +01:00
Roeland Jago Douma 5f5951c8cf [Share 2.0] Let the factory do the factory stuff
* Updated unit tests (bit cleaner now)
2016-01-13 16:35:15 +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
Roeland Jago Douma 67b7ebccd1 [Share 2.0] Add share provider factory
* Add providers
* Add share manager to server container
* Use share manager from server container
* Properly get the share manager
2016-01-13 16:35:14 +01:00
Roeland Jago Douma b4de427c1e [Share 2.0] Allow registering of share providers
* Properly register the default share provider
2016-01-13 16:35:07 +01:00
Roeland Jago Douma 1358e5dcd9 [Sharing 2.0] Some error cases report 404 instead of 403 2016-01-06 15:25:29 +01:00
Roeland Jago Douma 26280e1f19 [Sharing 2.0] Add L10N instance to manager for translated errors 2016-01-06 14:53:43 +01:00
Roeland Jago Douma b15be8f96f [Share 2.0] Make the share manager ready for share creation 2016-01-06 14:53:43 +01:00
Roeland Jago Douma a08c497808 [Share 2.0] Make share provider ready for create shares 2016-01-06 14:53:43 +01:00
Roeland Jago Douma a2b8483779 [Sharing 2.0] Default share provider only generic DI
No injection of userfolders etc. Only generic DI components
(IRootFolder) etc should be used to make sure we can also run this from
the cli
2015-11-24 10:26:36 +01:00
Roeland Jago Douma aeae73b364 [Sharing 2.0] Removed unused DI stuff
The share manager etc should not care about filtering stuff. They should
return what is asked for them.
2015-11-24 10:26:36 +01:00
Roeland Jago Douma 1360e22d7c [Sharing 2.0] Move hook and delete children logic to share manager
To make sure hooks are always fired and child entries are always
cleaned. This logic is moved to the share manager.

* Updated unit tests
2015-11-23 12:28:54 +01:00