Repository navigation
Share folders of your home with other users - #23
Merged
Merged
Conversation
A user can now let another user into a folder of their home, or the whole home, to view what is in it or to edit it too, from a People popover in the folder. The Shared page lists the folders you share and those shared with you, where owners stop sharing and users leave. Shares are built-in rules for their user that allow only what the owner may do and share there; administrators' rules for the same paths come first. They follow the folder when it moves within the home, and end when it is deleted, leaves the home or is replaced, or when either user is deleted. WebDAV shows the way to them through /home/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Stacked on #22 (chunked WebDAV uploads): merge that first, then this one's base becomes
main.What it does
A user can let another user into a folder of their home, or the whole home:
/home/and the owner's home list the way to the shared folder and nothing else of the owner's.action=grant&path=…&user=…&access=read|editandaction=ungrant&id=…on/.shares/(JSON for scripts, redirects for browsers).How it works
folder_shares(migration 009): owner, real path, user, can_write.share, so they cannot make links to it or pass it on.RulesFornow does one indexed query per request for the visitor's shares.Not covered
Tests
internal/auth/people_test.go, on both the memory and Postgres stores:internal/server/people_test.go:-race+ Postgres on macOS (exceptTestLongNonASCIIPath, which only fails on macOS, as before).🤖 Generated with Claude Code