Skip to content

server to server sharing next generation - #12749

Merged
schiessle merged 1 commit into
masterfrom
server2server-sharing-ng
Dec 19, 2014
Merged

schiessle merged 1 commit into
masterfrom
server2server-sharing-ng

Conversation

@schiessle

Copy link
Copy Markdown
Contributor

Next step in server-to-server sharing next generation, see #12285

Beside some small improvements and bug fixes this will probably the final state for OC8.

To test this you need to set up two ownCloud instances. Let's say:

  • URL: myPC/firstOwnCloud user: user1
  • URL: myPC/secondOwnCloud user: user2

Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud".

The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined.

If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.

ToDo (I will provide PRs for it):

This is ready for testing and reviewing cc @LukasReschke @icewind1991 @MorrisJobke @PVince81

Comment thread apps/files_sharing/ajax/accept.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

@schiessle
schiessle force-pushed the server2server-sharing-ng branch from 0a25711 to f9f6f55 Compare December 10, 2014 12:10
Comment thread lib/private/share/share.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot be sure that the HTTPS site serves the same site as the HTTP one. Thus it might make sense to check the returned XML/JSON.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also why don't we store the protocol that the remote server supports? - IMHO better than guessing around.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that if you want to share a file with me you don't care about http or https. You will just enter "[email protected]" to you share drop-down. Like a mail address. We will then try to use https if it doesn't work we fall back to http.

@LukasReschke

Copy link
Copy Markdown
Contributor

@schiesbn Some sharing tests are failing.

@schiessle

Copy link
Copy Markdown
Contributor Author

@LukasReschke will have a look... Worked locally.

@LukasReschke

Copy link
Copy Markdown
Contributor

As discussed with @schiesbn I'll hijack this PR a little bit to remove the static AJAX files.

@LukasReschke

Copy link
Copy Markdown
Contributor

Apologize for messing with the Git history. - I made a chaos and now it's only a single commit but my changes should be in there…

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some kind of permission checks. - For example and user = ?.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

& doc block? same below

@jancborchardt

Copy link
Copy Markdown
Contributor

Found a clash with the Contacts app, see owncloud/contacts#745

@schiessle

Copy link
Copy Markdown
Contributor Author

@jancborchardt I already prepared a PR for contacts and calendar to fix it, the initial description of the PR mention both fixes: #12749 (comment)

@jancborchardt

Copy link
Copy Markdown
Contributor

Ah, sorry.

Testing it further, everything seems to work, but the folder does not show in the »Shared with you« list.

@schiessle

Copy link
Copy Markdown
Contributor Author

but the folder does not show in the »Shared with you« list.

Because internally it is the same like a mounted public link which we don't show in the "Shared with you" view at the moment. Need to decide if we want to integrate it there in the future, create a new view for it or keep it as it is. For the moment it is out of scope for this pr.

@PVince81

Copy link
Copy Markdown
Contributor

I thought there was a ticket for that but cannot find it.

@jancborchardt

Copy link
Copy Markdown
Contributor

Need to decide if we want to integrate it there in the future, create a new view for it or keep it as it is.

We should integrate it, otherwise it’s confusing. A new view is not necessary.

For the moment it is out of scope for this pr.

Probably, yeah.

@schiessle

Copy link
Copy Markdown
Contributor Author

All tests passed here: #12904. Only npm failed at the end, which can be ignored,

Would be great to get this reviewed and merged today before everyone starts into the holiday season. 😄

cc @LukasReschke @icewind1991 @MorrisJobke @PVince81

@icewind1991

Copy link
Copy Markdown
Contributor

👍

@LukasReschke

Copy link
Copy Markdown
Contributor

@schiesbn Rebase? :-)

Beside some small improvements and bug fixes this will probably the final state for OC8.

To test this you need to set up two ownCloud instances. Let's say:

URL: myPC/firstOwnCloud user: user1
URL: myPC/secondOwnCloud user: user2
Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud".

The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined.

If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.
@schiessle
schiessle force-pushed the server2server-sharing-ng branch from dab819c to 2499328 Compare December 19, 2014 14:22
@schiessle

Copy link
Copy Markdown
Contributor Author

rebased

@jancborchardt

Copy link
Copy Markdown
Contributor

@schiesbn I looked through it and it looks fine, not a lot of changes UI wise. Or is there anything in particular you want me to look at?

@schiessle

Copy link
Copy Markdown
Contributor Author

@jancborchardt as you sad, there are not much UI changes. So this should be OK, thanks for having a look!

@schiessle

Copy link
Copy Markdown
Contributor Author

second code review... @LukasReschke do you want to have a final look?

@LukasReschke

Copy link
Copy Markdown
Contributor

@schiesbn Yes - let me give a few mins to finish my other tasks before ;-)

@MorrisJobke

Copy link
Copy Markdown
Contributor

I just tested this locally.

  • thumbnails in shared folders aren't available
  • share isn't listed in "Shared with you"

I will give this just a half : +1 : (invalidated)

SO please wait for @LukasReschke final review

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • delete a file that is in a share with read only permission over the checkbox and the delete button in the table header will result in endless spinner - feedback is only available using the trash can on the end of the row

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 25 new issues, 33 updated code elements

@schiessle

Copy link
Copy Markdown
Contributor Author

@MorrisJobke Thanks for testing!

thumbnails in shared folders aren't available

I can't reproduce it, thumbnails are shown to me. Also this should be the exact same code as for the "old" server-to-server sharing. Does the Thumbnails work if you share the folder as public link and mount it to the ownCloud?

share isn't listed in "Shared with you"

Known issue for server-to-server sharing, unrelated to this PR

delete a file that is in a share with read only permission over the checkbox and the delete button in the table header will result in endless spinner - feedback is only available using the trash can on the end of the row

Unshare worsks for me in both direction. Recipient can unshare with the trash can at the right. Owner can unshare with the trash can in the share dialog.

Maybe you can try it again, make sure that you don't have old JavaScript code in the browser cache.

I will merge this now. Please open a bug report if you have the feeling that this is still broken.

schiessle added a commit that referenced this pull request Dec 19, 2014
server to server sharing next generation
@schiessle
schiessle merged commit 8164415 into master Dec 19, 2014
@schiessle
schiessle deleted the server2server-sharing-ng branch December 19, 2014 18:04
@MorrisJobke

Copy link
Copy Markdown
Contributor

@schiesbn I don't like that this was merged, before @LukasReschke reviewed it another time and the issues are I listed are just ignored. Be prepared that this could cause some trouble later. I will not revert this anyway.

@PVince81

Copy link
Copy Markdown
Contributor

@MorrisJobke note: the share is never listed under "share with you", not even on master / OC 7.0.4, this feature was never added. Something to do separately: #9098

@schiessle

Copy link
Copy Markdown
Contributor Author

@MorrisJobke I didn't ignored your issues but I neither I could reproduce it nor the other reviewers could reproduce it, or it is unrelated to the PR, like explained by me and @PVince81. I commented on all your issues, I didn't ignore them. Sorry, if this was your impression.

As far as it goes to the review from @LukasReschke he reviewed it already multiple times (thanks a lot for this!) and I'm confident that we could iron out all issues. Since his last review nothing substantial changed. The PR was open for a long time, I had two +1, with some concerns from your side which I addressed the best way I could. So it was time to merge it. If some bugs will show up we can still fix them in January , but the general feature needs to be in before feature freeze.

@MorrisJobke

Copy link
Copy Markdown
Contributor

If some bugs will show up we can still fix them in January , but the general feature needs to be in before feature freeze.

That's not the way we should develop nowadays. It was fine for years, but we should be more careful, if we want to not bust our image as getting more stable. It was a hard way and we shouldn't waste again time of users by just being not careful.

I'm fine with this merge, but be prepared, that I don't like it that much - just getting something in because of itself isn't something nice ;)

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants