Uh oh!
There was an error while loading. Please reload this page.
Shares are displayed to users with resharing rights - #12105
Conversation
This is a proof of concept. missing:
|
MorrisJobke
commented
Oct 30, 2018
cc @nextcloud/sharing |
ArtificialOwl
commented
Oct 30, 2018
The circles app needs to be upgraded to https://github.com/nextcloud/circles/tree/compat15 |
ArtificialOwl
commented
Oct 30, 2018
julius made some change in the UI so that there is no more possible interaction (with errors) when user have resharing rights, but is not owner. I would like to have someone with better knowledge on the sharing stuff, while we check with the new tests. @rullzer maybe ? |
| foreach ($shares as $share) { | ||
| try { | ||
| $formatted[] = $this->formatShare($share, $path); | ||
| if (!$resharingRight && $this->shareProviderResharingRights($this->currentUser, $share)) { |
There was a problem hiding this comment.
I think you can just get the node the share points to here and check if you have share permissions. Then the whole backend works for you to figure out if you have sharing rights.
rullzer
commented
Oct 31, 2018
I think the basis are good. However I'm not sure if the provider changes are enough. because if the file is owned by me. (So i'm the owner). Or the file is reshared by me.
Now if userA, userB, userD or userE query the endpoint they should all get the complete list of people with share access right? Only userC should not get the list. I do not think this change accomplisches this yet right? |
92a941a to
692b892CompareArtificialOwl
commented
Oct 31, 2018
@rullzer so I made a bunch of manual test based on your list, and it work as expected. Last work from @juliushaertl improve a lot UX.
|
ArtificialOwl
commented
Oct 31, 2018
However, tests needs to be checked ! |
Failing unit tests don't look related: Edit: They are unrelated #12009 (comment) |
juliusknorr
commented
Oct 31, 2018
@daita As far as i can see, there is just a phan error really failing due to this PR. 🙈 |
9e88c56 to
5a8c066CompareArtificialOwl
commented
Nov 1, 2018
wtf, all tests are green !? |
MorrisJobke
commented
Nov 1, 2018
@nextcloud/sharing Please review this one |
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
82c0e70 to
77b95ccComparejuliusknorr
commented
Nov 2, 2018
Rebased to resolve conflicts. |
MorrisJobke
commented
Nov 2, 2018
@juliushaertl Do you mind to also review it? |
rullzer
commented
Nov 2, 2018
So this will require client changes. Can you tell me exactly when a client has the rights to edit an entry? |
ArtificialOwl
commented
Nov 2, 2018
There is no change in the edition of an entry, we only providing more information (shares list) to people with resharing rights. Meaning, you can edit an entry when you are the owner of the share, or owner of the file. Note that the listing contains all shares and is complete: the API will send the current username of the viewer, so this should be hidden by the client. |
rullzer
commented
Nov 4, 2018
ok so it indeed works as adversited However we will need to extend the client to show the same info. I'm just pinging you all here so somebody reminds me/us that we need to fix that. |
rullzer
commented
Nov 4, 2018
LGTM merged now and fix issues we find later. |
tobiasKaminsky
commented
Nov 5, 2018
Can you give as info, how where and what we should display? :-) |
tobiasKaminsky
commented
Nov 5, 2018
tobiasKaminsky
commented
Nov 5, 2018
http://localhost/nc/ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2Freshare&reshares=true How do I see that this is a reshare and current user is not allowed to edit it? |
jospoortvliet
commented
Nov 9, 2018
@daita nice improvement! 👍 |
skjnldsv
commented
Aug 16, 2019
@daita there are some weird stuff going on here :)
This is supposed to be the correct behaviour, right? |
@daita yep, found the issue. server/apps/files_sharing/lib/Controller/ShareAPIController.php Lines 770 to 772 in 85a80b0 Once resharingRight we never check for shareProviderResharingRights again. @rullzer, @blizzz, @nickvergessen, @MorrisJobke I fail to really grasp how this miniFormatted variable works there, but it seems like we have a bug there. |
So in the end, after some talk, it was an issue not related to the existing code. |
skjnldsv
commented
Aug 19, 2019
All good btw, we had a late night call with Maxence and figured things out. |


Signed-off-by: Maxence Lange maxence@artificial-owl.com