Repository navigation
[Share 2.0] get shares - #21532
[Share 2.0] get shares#21532
Conversation
|
By analyzing the blame information on this pull request, we identified @SergioBertolinSG to be a potential reviewer |
There was a problem hiding this comment.
where did offset and limit go?
There was a problem hiding this comment.
I removed them for now since I still need to think how to do that properly with multiple providers... I need to think of a way that will properly scale..
There was a problem hiding this comment.
since the sharetype was passed in the call can be redirected to exactly one provider - right?
There was a problem hiding this comment.
well we don't know the shareType for a lot of calls.. For example the OCS Share API usually is called without arguments. Or maybe a path.
But I have no idea how to do limit and offset with multiple providers effeciently.
So should we just add the shareType as a required parameter. Will result is more queries. But makes pagination possible. Note that these are (for the default provider at least) straight forward queries. That just do selection. So they are less of an issue than update/delete stuff...
97f895b to
be3e35d
Compare
|
Ok feedback needed. What do we expect the getShares function to return (I know shares). But I came across a slightly more tricky situation.
Thus basically we have the following:
No if I query getShares for user1 (so get all the shares by) It should only return the share with id 1. The other stuff is internal and has no place on the outside! But now what if we want to call the function I would think we want to return the 'original' share. But the permissions set to 0 right? That way the share manager is nicely kept in the dark about share type 2 (which is good). But then we need to think about the delete function a bit. Because if the receiving user deletes a share other stuff should happen than if the owner or initiator deletes a group share. Input and comments are appriciated: @schiesbn @DeepDiver1975 @nickvergessen @PVince81 |
yes, I think that's the right behavior.
What differences do you see here. I think this are just two seperate operation "unshare" and "unshare-from-self". Which can work the same way for sharing 2.0 as it works now. Some more general thoughts: In the long run I would like to have a side-bar entry "open shares" which contain unaccepted federated share. I would also move group/user shares there if the user unshares them from self, so that he can bring them back if he wish. |
Exactly we then need a delete-from-self function. Which is fine. But needs to be added then.
Yes we can easily query for this. And we should have it indeed. |
|
@DeepDiver1975 I'll add the pagination back. But in the OCS SHare API currently there is no pagination so we just fetch everything. I also added a $shareType parameter to the calls since that is the only way I can get proper pagination. In other words the OCS Share API v2 can figure out itself how to handle that all properly. |
be3e35d to
61951f1
Compare
There was a problem hiding this comment.
no change of behavior I guess?
There was a problem hiding this comment.
Yeah this is currently not in there so no need to add it now indeed.
|
Apart from #21532 (comment) and a few clarifications, the code looks good. I haven't tested it. Are there unit tests ? Are these changes covered by the API tests ? |
|
@PVince81 ah right I have the tests stashed somewhere... lets add them :P |
61951f1 to
e029ac2
Compare
|
@PVince81 unit tests added (I had some but extended a bit). This is also tested via the intergration tests. @nickvergessen could you smash? |
e029ac2 to
3bf51a5
Compare
|
👍 |
|
Smashing now... |
|
Smashbox worked. |
There was a problem hiding this comment.
$node could be typehinted to OCP\Files\Node ?
There was a problem hiding this comment.
In theory yes. But I actually want it to be either a File or a Folder. Typehinting it to node might give the wrong idea...
|
This PR breaks the share filters of the file list for me: Only: |
There was a problem hiding this comment.
this can also be 'false' 🙊 in case of outgoing shares
There was a problem hiding this comment.
well setting it to false should to not do anything....
|
@rullzer rebase please |
3bf51a5 to
6589595
Compare
|
rebased. |
|
👍 |
Now that create shares is in. Rebasing and refactoring of the other code paths can continue.