-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable31] fix(sharing): Allow public share access for everyone #56797
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
base: stable31
Are you sure you want to change the base?
Conversation
c4dadbd to
569b46f
Compare
|
Failure is related. |
When a logged-in user accesses a public share link in the same browser, the system was incorrectly checking if that user's groups were excluded from creating link shares. This caused share not found errors for users in excluded groups, even though public shares should be accessible to anyone with the link. The group exclusion setting (`shareapi_allow_links_exclude_groups`) is intended to restrict share creation, not share access. Public shares are meant to be anonymous and accessible regardless of the viewer identity or group membership. We now check the exclusion for the share creator and not the viewer. Signed-off-by: nfebe <[email protected]>
569b46f to
fb6a8ab
Compare
|
|
||
| $share = $this->manager->newShare(); | ||
| $share->setShareType(IShare::TYPE_LINK) | ||
| ->setPermissions(Constants::PERMISSION_READ); |
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.
| ->setPermissions(Constants::PERMISSION_READ); | |
| ->setPermissions(\OCP\Constants::PERMISSION_READ); |
|
|
||
| $share = $this->manager->newShare(); | ||
| $share->setShareType(IShare::TYPE_LINK) | ||
| ->setPermissions(Constants::PERMISSION_READ); |
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.
| ->setPermissions(Constants::PERMISSION_READ); | |
| ->setPermissions(\OCP\Constants::PERMISSION_READ); |
provokateurin
left a comment
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.
Blocking until tests are fixed
Backport of PR #55811