Skip to content

feat: list all shares for guest users - #3829

Merged
JammingBen merged 2 commits into
mainfrom
feat/guest-shares-list
Oct 20, 2026
Merged

JammingBen merged 2 commits into
mainfrom
feat/guest-shares-list

Conversation

@JammingBen

@JammingBen JammingBen commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Description

Add the possibility to list all received shares for a guest user. They get can access it via the left nav or the breadcrumbs.

Also "Move to" is now hidden on share roots for all users, since a received share can't be moved.

Issue

closes #3503
fixes #3836

How to test

  1. Pull the latest opencloud image
  2. run docker run --rm --network container:web_oc natsio/nats-box nats -s nats://127.0.0.1:9233 sub main-queue --raw | jq --unbuffered -r 'select(.Metadata.eventtype | test("GuestTokenCreated")) | .Payload | @base64d | fromjson | .Token'
  3. create 2 guest invites for the same email address
  4. copy one token from the output of (1)
  5. use the token in the URL https://host.docker.internal:9200/g/

@JammingBen
JammingBen added this pull request to stack #3830 October 16, 2026 09:18
@JammingBen
JammingBen force-pushed the feat/guest-shares-list branch 2 times, most recently from ee5a5ec to 6be5e27 Compare October 16, 2026 09:46
@JammingBen
JammingBen force-pushed the feat/guest-shares-list branch from 6be5e27 to 2a1a8be Compare October 16, 2026 12:12
@JammingBen JammingBen self-assigned this Oct 16, 2026
Base automatically changed from feat/guest-full-ui to main October 16, 2026 12:52
@JammingBen
JammingBen force-pushed the feat/guest-shares-list branch 2 times, most recently from 25e6950 to 21dd202 Compare October 16, 2026 13:15
@JammingBen
JammingBen force-pushed the feat/guest-shares-list branch from 21dd202 to ac42b46 Compare October 19, 2026 06:52
@JammingBen
JammingBen marked this pull request as ready for review October 19, 2026 07:46
@AlexAndBear

Copy link
Copy Markdown
Member

Review and browser test at ac42b46 (known backend limitations excluded):

  • Share-root "Copy to" does nothing: picking another writable share and "Copy here" closes the picker with no request and no message. The handler selects currentFolder, which isn't in resources, so the selection is empty. Same on main for any breadcrumb "Copy to". Guest share-root Copy and Move actions open blank destination dialogs #3836 asked to hide the root actions for guests; only Move is hidden.
  • "Copy to" without a target: a guest with only read-only shares gets "Copy to" on files and the root, but "Copy here" is always disabled. The removed guards in useFileActionsCopy/useFileActionsSave hid it on main; their guest tests were deleted.
  • Move on share roots: now hidden for logged-in users too (isShareRoot in useFileActionsMove.ts:220); worth a line in the description.
  • Vault guard without shareId: setupVaultUnlockGuard.ts:90 looks the share up by drive alias, useDriveResolver falls back to guestSpaceId; with same-named shares they can differ.
  • Nav item ids: user and guest "Shares" both get app.files.Shares, so disabling it hides both.
  • Single file without default app: lands on the shares list with breadcrumb "Shares" only; [Guests] Shared with me page for guests #3503 says "Shares > {filename}".
  • Guest list: "Shared with" always shows the guest themselves.

@JammingBen

Copy link
Copy Markdown
Member Author

Thanks! 2 issues worth fixing, the rest is intended behavior/misleading acceptance criteria/not worth the effort fixing.

  • Share-root "Copy to" does nothing: picking another writable share and "Copy here" closes the picker with no request and no message. The handler selects currentFolder, which isn't in resources, so the selection is empty. Same on main for any breadcrumb "Copy to". Guest share-root Copy and Move actions open blank destination dialogs #3836 asked to hide the root actions for guests; only Move is hidden.

True, this is a bug on main though. Offering the "Copy to" option is still the correct thing. I'll check the existing issues and create one if needed.

  • "Copy to" without a target: a guest with only read-only shares gets "Copy to" on files and the root, but "Copy here" is always disabled. The removed guards in useFileActionsCopy/useFileActionsSave hid it on main; their guest tests were deleted.

This is intended. A user should be able to copy from a read-only share to a writable one. It's a trade-off, but IMO not worth checking permissions for all shares for these actions.

  • Move on share roots: now hidden for logged-in users too (isShareRoot in useFileActionsMove.ts:220); worth a line in the description.

I added a line to the PR description.

  • Vault guard without shareId: setupVaultUnlockGuard.ts:90 looks the share up by drive alias, useDriveResolver falls back to guestSpaceId; with same-named shares they can differ.

True, will fix it in this PR.

  • Nav item ids: user and guest "Shares" both get app.files.Shares, so disabling it hides both.

I'd say this is an edge case that's currently not worth the effort fixing. We would need to change the menu item's name, or introduce an id. Hiding menu extensions via WEB_OPTION_DISABLED_EXTENSIONS is also not documented.

Yes, this is correct. I made the expected behavior more clear in #3503.

  • Guest list: "Shared with" always shows the guest themselves.

True, will fix it in this PR.

@JammingBen

Copy link
Copy Markdown
Member Author

I pushed the 2 fixes and created #3932 for the issue with copying the current folder.

@JammingBen
JammingBen merged commit 859efd1 into main Oct 20, 2026
27 checks passed
@JammingBen
JammingBen deleted the feat/guest-shares-list branch October 20, 2026 12:58
@openclouders openclouders mentioned this pull request Oct 20, 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.

Guest share-root Copy and Move actions open blank destination dialogs [Guests] Shared with me page for guests

2 participants