Commit Graph

20 Commits

Author SHA1 Message Date
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
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 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 623a0e4637 Example hook check 2016-02-09 10:36:44 +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 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 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
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
Roeland Jago Douma 4f2e84a0ec [Share 2.0] Update share class
More getters and setters are required to properly create shares
2016-01-06 14:53:43 +01:00
Roeland Jago Douma 85976b7293 [Sharing 2.0] Fix phpdoc etc 2015-11-24 10:26:36 +01:00
Roeland Jago Douma 1e9fc33212 [Share2.0] OCS Share API getShare uses new code 2015-11-16 13:32:28 +01:00
Roeland Jago Douma 0be05fdddd Add unshare hooks 2015-11-05 15:59:09 +01:00
Roeland Jago Douma 6624fa212a The new sharing code now handles deletion
OCS -> ShareManager -> DefaultShareProvider
2015-11-05 15:59:09 +01:00
Roeland Jago Douma 9567fa1194 Initial setup of shareing 2.0 sharemanager and share
* Added sharemanager class

This is the central class where all API calls talk to (OCS/Activity).
This in turn talks to the share providers to get the actual sharing
done.

It uses all ShareObjects

* Added share class

Simple class to hold all the share properties that is passed around

* Added IShareProvider interface

Interface that providers os a share have to implement.
2015-11-05 15:59:08 +01:00