Skip to content

feat: open permanent links as a guest - #3908

Merged
JammingBen merged 2 commits into
mainfrom
feat/guest-permanent-links
Oct 21, 2026
Merged

JammingBen merged 2 commits into
mainfrom
feat/guest-permanent-links

Conversation

@JammingBen

Copy link
Copy Markdown
Member

Restores an active guest session on the private link route and resolves the resource by walking up to the guest share root. Also allows guests to copy permanent links.

closes #3817

@JammingBen JammingBen self-assigned this Oct 19, 2026
@JammingBen
JammingBen force-pushed the feat/guest-permanent-links branch 4 times, most recently from 4999eb9 to 38e9baf Compare October 20, 2026 07:23
@JammingBen
JammingBen marked this pull request as ready for review October 20, 2026 08:10
Restores an active guest session on the private link route and resolves
the resource by walking up to the guest share root. Also allows guests
to copy permanent links.
@JammingBen
JammingBen force-pushed the feat/guest-permanent-links branch from 38e9baf to 4d43d44 Compare October 20, 2026 13:08

@AlexAndBear AlexAndBear 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.

Tested this in the browser. Copying and opening permanent links as a guest works nicely for files, folders and the share root, and users and public links behave like before. Found a few things though:

  • Links into a guest's other shares don't resolve. With two shares for the same guest, links into any share except the one the session was opened with show the "invalid link" card + Log in, although the guest can browse that share. useGetResourceContext.ts:45/:54 only walks up to authStore.guestSpaceId, but the guest token covers all shares of that email.
  • An app URL without the drive alias ends the guest session. E.g. /text-editor?shareId=…&fileId=…: addMissingDriveAliasAndItem (AppWrapper.vue:346) now resolves for guests but builds a user route (contextRouteName: 'files-spaces-generic'), so the guest session gets cleared and the guest is locked out until they get a new link. On main the editor just showed an error and the session survived.
  • Expired guest session on /f/ sends the guest to the IdP login (authService.ts:366), while guest routes go to the renewal page. I'd send /f/ to renewal as well, guests can't log in at the IdP anyway.
  • Minor: the "Log in" button (resolvePrivateLink.vue:122) uses router.push('/login'), so Back from the IdP lands on /login and bounces right back. It also ignores options.loginUrl, which accessDenied.vue and logout.vue respect.

@JammingBen

JammingBen commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Thanks, I fixed points 1, 2, and 4.

Point 3. is a deliberate choice. Unlike guest routes, permanent links can't be identified as guest routes, so I took the most defensive approach here, which is to only treat such a link as a guest if there is an active guest session. In case of an expired one, the guest needs to renew it via their email.

@JammingBen
JammingBen merged commit 16236a7 into main Oct 21, 2026
27 checks passed
@JammingBen
JammingBen deleted the feat/guest-permanent-links branch October 21, 2026 08:45
@openclouders openclouders mentioned this pull request Oct 21, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Guests] Open permanent links as a guest

2 participants