Repository navigation
fix(files_sharing): return share tokens to users with matching permissions - #66977
Open
sanketpatel32 wants to merge 1 commit into
Open
sanketpatel32 wants to merge 1 commit into
sanketpatel32 wants to merge 1 commit into
Conversation
sanketpatel32
requested review from
a team,
ChristophWurst,
SebastianKrupinski and
tcitworld
as code owners
November 24, 2026 03:08
sanketpatel32
requested review from
GhassenKefi,
icewind1991,
kristian-zendato,
pabzm,
pringelmann and
provokateurin
and removed request for
a team
November 24, 2026 03:08
devin-ai-integration
Bot
force-pushed
the
fix/link-share-token-visibility
branch
from
November 24, 2026 07:32
48e9167 to
6a1636f
Compare
…sions Recipients of a share that grants all of the node's permissions (e.g. members of a group or team a link share targets) were shown the share without its token and URL, so they could not see or copy the public link anymore. The additional canEditShare() gate hid the token unless the viewer owned or initiated the share. Restore the previous behavior: return the token whenever the viewer's permissions cover the share's permissions, regardless of who created the share. Fixes nextcloud#65935 Assisted-by: Devin:devin Signed-off-by: Sanket Patel <sanpatel323@gmail.com>
sanketpatel32
force-pushed
the
fix/link-share-token-visibility
branch
from
November 24, 2026 16:25
6a1636f to
0befce4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recipients could no longer see or copy public link shares shared with them.
formatShareonly returned the sharetoken/urlwhen the viewercanEditShare()— i.e. owned the share, initiated it, or reshared an ownerless mount. Everyone else (e.g. members of the group or team a link share targets) gotnulland could not open or copy the link even though their permissions covered the share's permissions.This restores the previous behaviour: the token is returned whenever the viewer's permissions on the node cover the share's permissions, regardless of who created the share. The stricter permission check on the node itself (added in #65258) is kept — only the additional
canEditShare()gate is removed.The test expectations changed by #65258 are restored accordingly (
dataGetShare,dataFormatShare).TODO
Signed-off-bytrailer before mergeChecklist
AI (if applicable)
Assisted by Devin:devin