-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Fix shares read permissions #16761
Fix shares read permissions #16761
Conversation
cee92bd
to
ec56209
Compare
This comment has been minimized.
This comment has been minimized.
ec56209
to
432c411
Compare
So, with the request to displays the list of sharing to users with resharing rights, I missed an endpoint resulting in users not being able to access information they should be allowed to read. This PR should allow users with resharing rights to retrieve data from a specific nice catch, @skjnldsv |
432c411
to
2194a02
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.
CI is not happy; it seems that this gives access to a share to users that should not be able to access it.
Similarly several sharing integration tests in Talk fail too with this pull request (which of course could just mean that they need to be adjusted to the new behaviour, but it seems that they are caused by the same aforementioned problem).
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
759ef6e
to
9afc6ac
Compare
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist')); | ||
} | ||
|
||
if ($share->getShareOwner() !== $this->currentUser && $share->getSharedBy() !== $this->currentUser) { |
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.
Already part of the canEditShare
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.
👍
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
🐘
717013b
to
845ac7f
Compare
/compile amend / |
Weird
|
three acceptance failing, but when running locally:
And the output doesn't even go to the end of test sstatus lines (like above) in drone, I guess it timed out 🤷♂️ |
So, even locally or the bot cannot find changes. |
Copied and adjusted from "tests/integration/run-docker.sh" in Talk; see its commit history for further reference. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This will be needed to test scenarios in which updating a share return a different HTTP status code, like 401. The assertion for the 200 HTTP status code was added in those scenarios that tested updating a share (that is, those that were also checking the OCS status code), but not in those in which updating a share was just a preparatory step for the actual test (in the same way that the HTTP status code is not checked in those tests when creating a share). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
845ac7f
to
b647341
Compare
Okay, the acceptances issues are on master, not on this pr. |
A user with reshare permissions on a file is now able to get any share of that file (just like the owner). Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
b647341
to
ff895ab
Compare
We need to check if getShare (singular) also have resharing rights :)