-
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
Check correct permissions when resharing #22740
Conversation
To give a bit more context. Since we don't know which node to pick we just take the node from the owner. When we verify permissions in the share manager this is enough. However in the OCS Share API we also have to verify that we have the permissions we want to provide. |
Fixes #22675 Since we only get a share id we do not know the path for the sharer. Now if we edit a share we start searching for shares for that user of that node. And deduce the permissions that way. * Intergration test added * Fix unit tests
495800c
to
8924b0a
Compare
👍 Works for me @rullzer! Fixed #22675 Just notice that now we receive |
Ok let me fix the error message as well :) |
Ok, but that number does not mean nothing to the user, instead we could show the name of the file |
On second tought... lets keep the message simple like it is. The user knows the action they performed... having the fileid in there is also not really helping :P. For 9.1 we want to fix more exceptions etc anyway. So then we can take this as well. Good that it sovled it. |
Of course you know the file and action in the app. So maybe for now it is best to contstruct an error message yourself. |
Totally agree! Maybe it is better show the shortets |
Code looks ok, however my test did not succeed: I shared a file from A to B with reduced permissions. With the desktop client, I attempted to share to C, however it failed with master as well as this branch with "Cannot increase permissions of ". Now I am not entirely sure whether this is a valid test case (but it does not look right either). |
I tested this just now and it works. I cannot increase the permissions anymore for the user. 👍 |
@blizzz yeah that with the desktop client is a different problem. Basically we need to check in the desktop client what permissions we can provide. |
Check correct permissions when resharing
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #22675
Since we only get a share id we do not know the path for the sharer.
Now if we edit a share we start searching for shares for that user of
that node. And deduce the permissions that way.
@PVince81 @cmonteroluque I really hate to do this but getting this into 9.0 is kind of curcial from my POV
@nasli please verify
The intergration test check the test case. But please try yourself ;)
CC: @schiesbn @MorrisJobke @nickvergessen @PVince81 @LukasReschke @DeepDiver1975