-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy to overwrite (file and folder) from Personal
to Shares Jail
behaves differently
#4393
Comments
Also see core PR owncloud/core#40308 - that demonstrates what happens currently in oC10 core. Maybe we want to forbid some of these "strange" COPY overwrite share requests? And define the expected/required behavior, and make both oC10 and oCIS match that. |
@phil-davis shall we wait for this owncloud/core#40308 (comment) ? On OCIS for |
I pinged again in owncloud/core#40308 - it will be useful to get confirmation about the expected/required behavior. Then we can write "correct" tests for the core-personal-spaces cases. And then we can make similar-style test cases for move and copy in and out of project spaces. |
I'm a little confused. Is this a real case? I don't know that will it ever be fixed. Maybe should we should change this tests or delete? |
I am looking at some test scenarios like this (using personal spaces, not project spaces) in PR #6323 - the expected behavior was defined in core recently (I will have to search for the links to that) Copying a source file "over the top of" another existing file is an "easy" scenario - the file content of the target is updated. There is a question about what to do with version history - do we copy the version history from the source file, or is the new content of the target file just a new version of the target file. Copying a folder "over the top of" another folder (not inside) - that could be implemented by doing some merge of the contents of the two folders. But the easy thing is to not allow that, and give some status like 409. Copying a file "over the top of" a folder (not inside) is a strange thing to do - so we should return a status like 409 and do nothing. Copying a folder "over the top of" a file is a strange thing to do - so we should return a status like 409 and do nothing. The server should never return HTTP status |
Semantically this is very clear: COPY means only content, no versions, no shares. In that case, it adds content and creates a new version, but should not copy older versions of the source file. |
MOVE has different semantics: The source file with all its versions and shares will be moved to the new location and an existing file will be completely replaced. That should always result in the overwritten target file being moved to the trashbin, with all its versions and shares. |
Yes, I agree.
409 is fine. I asked because tests expect |
@butonic Had mentioned a case where copying a folder over a file is valid. |
it means that the expectations of the tests are correct. leaving tests in expected failures file |
I think the actual endpoint is different to copy share inside the
above endpoint return related issue : #6999 cc: @ScharfViktor @micbar |
Closed on the behalf that api endpoint is revised and the new API endpoint is QA-TEAM To-do
Related issue |
The shares folders of a user can also be accessed by the users |
Description
When we copy a file over the top of an existing folder from
Personal
toShares Jail
we get500
status code. Also when we copy folder over the top of an existing file (given user has an editor role to the shared resources) then the status code is403
.Steps to reproduce
einstein
creates a filet1.txt
and a folderFOLDER
moss
creates a folderMOSSS-Folder
moss
creates a folderMOSSS-Folder/sample-folder
moss
shares the folderMOSSS-Folder
toeinstein
einstein
copyt1.txt
over the folderMOSSS-Folder
curl command to copy:
Response:
Also copying a folder into a file
curl command
Note: Needs some information regarding it what is expected and what is actual as
OC10
gives a status of204
. or its forbidden inocis
forspaces
?The text was updated successfully, but these errors were encountered: