Repository navigation
[Sharing 2.0] create share - #20773
Conversation
8d04722 to
28961d0
Compare
|
So we need to properly generate targets. The question is where do we want to do this? Currently there is this whole bounching around. From share/share.php => share/helper.php => files_sharing... => files_sharing/lib/helper.php etc I think it would be best to handle this in the share provider. Since there it can be decided what to do. Since for example for federated sharing and maybe custom share providers there might be no (or a different) need when generating targets. @schiesbn what do you think? |
|
Once a share gets created I would simply add the path of the owner as target and check for name collisions once the share gets mounted for the recipient and adjust the target then. This should have a much better performance instead of creating for all recipients (which can be a lot if you think about group shares) a unique target during the share operation. Maybe, to improve performance during mount we could add a flag to the share to indicate if it is already a unique target or not so that we do the check for every share only once and not during every mount. |
|
OK agreed :) |
|
Seems the current tests are failing because we do not copy over the skeleton dir properly if there is a mountpoint for that file in place. |
2a3a3be to
9a6f41b
Compare
|
The current failing OCS test is caused by not creating explicit reshares of files anymore. |
bd4f98d to
ea972d8
Compare
Just to clarify this part to make sure that we don't miss something. We shouldn't set the full owner path as target by default but only the file/folder name of the shared file/folder concatenated with the default target for shares (default is the root folder but it can be changed in config.php) |
Yes, I now just take the name of the file/folder. Should add the default folder. But indeed not the whole path. |
f8b364b to
cbc6845
Compare
|
Target is now constructed with share_dir |
cbc6845 to
65749f5
Compare
|
@rullzer please rebase to get latest changes regarding the ocs api test execution in - maybe we see something of value in the logs why this breaks .... THX |
ca2c133 to
f3e125d
Compare
|
@DeepDiver1975 rebased. The only failing test I see is the one where we check for reshares. This is disabled for now. And we should be able to renable that once we implement getShares in the new code. Since that will list all reshares based on who owns the file etc. |
|
@DeepDiver1975 @schiesbn @nickvergessen @PVince81 I know more test coverage is needed here. But I'd appriciate if you can already look at this PR. Especially the manager part (that holds the most 'logic'). And see if I'm missing something critical. |
There was a problem hiding this comment.
yes, try-catch block below should already catch broken date strings.
f795743 to
659d34a
Compare
|
Ok, so apparently we threw a 403 by default. This is fixed now... now trying to get all places we throw something else... |
|
Ok, I think smashbox should be happier now. |
|
Smashed it, and it passed on owncloud/smashbox#140 now. |
90a470b to
d32bae8
Compare
More getters and setters are required to properly create shares
Else we run into race conditions with the skeleton code
The new sharing code handles things differently so there is no way for create shares to handle this all properly.
This is the same as the old behaviour
d32bae8 to
d3d24f9
Compare
d3d24f9 to
1358e5d
Compare
|
\o/ :joy: :tada: |
|
Now that smashbox is passing as well. Please review once more. @schiesbn @nickvergessen @DeepDiver1975 |
|
all tests passed and code looks good at first sight, so let's get this in to move forward 👍 |
no api change! |
|
👍 |
[Sharing 2.0] create share
Creating a share with the new sharing code.
It sets the new uid_fileonwer column right away.
TODO:
New integration tests?Generate new target (do on initmount)