-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
show reshare public links to the original share owner #36865
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
I'd wait for PM to take a decision here. Taking into account the comment, I guess the behaviour was intended and we should provide a way to distinguish both cases. If everyone agree with the current change, I think it's better to leave a comment if the expected solution is around that piece of code. |
@jvillafanez PM is okay with changes, we will show re-sharer properly in Phoenix. Also, @voroyam verified the fix. Since current intended behavior identified as a bug, I do not see much benefit in adding a comment to the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everyone agree, so let's move on.
4f98864
to
ac6bc2c
Compare
Even though there was a force-push 1 hour ago, this branch https://github.com/owncloud/core/tree/show-reshare-links still says that it has a @karakayasemi It needs to be rebased right up-to-date with |
ac6bc2c
to
84772e6
Compare
No idea how can I increase the coverage of deleted lines. @micbar, @phil-davis maybe merge this with repo owner permission? |
This works for me with manual testing. We should really make some automated test to demonstrate this. In the screenshot, Anne has shared with Bob, and Bob has created a public link of the received share. Anne can see the public link - good. There is no way for Anne to see that it is a public link "created by Bob". Maybe that is a meaningless thing to ask? Does "the system" have the public link stored somewhere under "Bob", or is it "really in the database" a public link of Anne's? |
It is easy to override the codecov result - if other's are OK with that, @micbar ? |
I did not fully understand the question but I can say, we store public links with original_share_owner and share_owner properties (they are available as uid_owner and uid_file_owner in this API response https://doc.owncloud.com/server/developer_manual/core/apis/ocs-share-api.html#get-all-shares). However, properly showing this information in web UI needs design decisions and out of the scope of this bug-fix PR. |
@kiranparajuli589 maybe it will be easy to add a webUI acceptance test scenario to this PR?
Please do it yourself, or assign someone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realise this is WIP. These 2 things will need to be adjusted @kiranparajuli589
tests/acceptance/features/webUISharingInternalUsers1/createShareWithUsers.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingInternalUsers1/createShareWithUsers.feature
Outdated
Show resolved
Hide resolved
a330daa
to
fdddb53
Compare
5b1c2d7
to
65aa689
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folder/file changes suggested do not make a difference to the test run (the step will work either way.
But it is confusing to read has shared folder "/lorem.txt"
tests/acceptance/features/webUISharingInternalUsers1/createShareWithUsers.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingInternalUsers1/createShareWithUsers.feature
Outdated
Show resolved
Hide resolved
Thank you @phil-davis for your guidance :) |
@kiranparajuli589 what is the status? Are you making progress here? |
bef966a
to
f521f92
Compare
@phil-davis you need to review the test code (it has become quite stale)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also see the drone CI results - there are lots of failed pipelines.
And user "user0" has uploaded file with content "uploaded content" to "lorem.txt" | ||
And user "user0" has shared file "lorem.txt" with user "user1" | ||
And user "user1" has shared file "lorem.txt" with user "user2" | ||
And user "user1" has created a public link share of file "lorem.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also have a scenario where both user0 and user1 have created a public link.
In that case, user0 should see 2 public link shares with name "Public link". You could make a Then
step like:
Then :number public link shares with name :name should be visible
That is a case when the UI needs to display multiple public links that have the same "display name".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then add a scenario where user0 deletes the public link(s), to make sure that user0 can delete the public link that was created by user1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phil-davis scenario is added.
please review!
@karakayasemi if user0 "owner" and user1 "share receiver" of a resource both create a public link, then they both have the link name "Public link". user0 sees 2 "Public link" in the list. It works fine - good! But user0 has no way on the UI to understand what is the 2nd "Public link" in the list - e.g. they cannot see that the public link was created by user1. Maybe that would be a separate feature, or not even a requirement at all? |
f521f92
to
c83d66e
Compare
Codecov Report
@@ Coverage Diff @@
## master #36865 +/- ##
=========================================
Coverage 64.75% 64.76%
Complexity 19135 19135
=========================================
Files 1270 1270
Lines 74909 74907 -2
Branches 1329 1328 -1
=========================================
Hits 48511 48511
+ Misses 26007 26006 -1
+ Partials 391 390 -1
Continue to review full report at Codecov.
|
c83d66e
to
5129609
Compare
5129609
to
ac5b851
Compare
@phil-davis I also noticed this and asked it to PM in here https://github.com/owncloud/enterprise/issues/3757#issuecomment-578405186 . It considered not a requirement of this bugfix ticket, it will be implemented properly in Phoenix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good.
Description
With this PR, reshare public links will be visible for the original share-owner.
There will be no difference in the UI between owner-created public links and reshare public links. However, if we want to show reshares to the owner properly, we need a solution for all clients (desktop, mobile, web). The desktop client already shows this information, no need to hide them in here.
Related Issue
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: