Skip to content

fix: versions for guest users - #4067

Merged
JammingBen merged 3 commits into
mainfrom
fix/guest-versions
Oct 29, 2026
Merged

JammingBen merged 3 commits into
mainfrom
fix/guest-versions

Conversation

@JammingBen

@JammingBen JammingBen commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

Guests couldn't list, restore or download versions of resources shared with them.

  • Listing and restoring: both used resource.id. For incoming shares, that is the share jail mount point id. Mount point ids only resolve for accepted shares, and guest shares are never accepted, so the backend returned a 404. Both now use resource.fileId (the actual resource id). For resources loaded via WebDAV, id and fileId are the same, so nothing changes there. This also fixes versions on unsynced shares of regular users.
  • Downloading: version downloads always signed the url client-side, which requires a username that guests don't have. getFileUrl gets a new signUrl option. Guests skip signing, since their session cookie authenticates the request, the same way archive downloads already work for guests.

How to test

  • Start OpenCloud with: GRAPH_AVAILABLE_ROLES: b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5,a8d5fe5e-96e3-418d-825b-534dbdf22b99,fb6c3e19-e378-47e5-b277-9732f9de6e21,58c63c02-1d89-4572-916a-870abc5a1b7d,2d00ce52-1fc2-4dbc-8b95-a73b73395f5a,1c996275-f1c9-4e71-abdf-a42f6495e960,312c0871-5ef7-4b3a-85b6-0e4074c64049,aa97fe03-7980-45ac-9e50-b325749fd7e6,63e64e19-8d43-42ec-a738-2b6af2610efa,3d00ce52-1fc2-4dbc-8b95-a73b73395f5a
  • Create a file with multiple versions
  • Share that file with a guest user, using the editor role that includes listing versions
  • Check the shared file as the guest user: listing, downloading and restoring should be possible now

Related Issue

@JammingBen JammingBen self-assigned this Oct 29, 2026
@JammingBen
JammingBen marked this pull request as ready for review October 29, 2026 10:25
@JammingBen
JammingBen requested a review from kulmann October 29, 2026 10:29

@kulmann kulmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@JammingBen
JammingBen enabled auto-merge October 29, 2026 15:23
@JammingBen
JammingBen merged commit 1f3f90e into main Oct 29, 2026
28 checks passed
@JammingBen
JammingBen deleted the fix/guest-versions branch October 29, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Guests] Versions don't get listed

2 participants