Per-user home directories (v0.4 #16) #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/per-user-homes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The authorization centerpiece: opt-in per-user home directories.
internal/storage/scope— a storage decorator (outermost) that rewrites each request's virtual namespace to/home/<username>for non-admins; admins (fromauth.admins) see the whole backend. Home dirs are lazily created; the username is validated as a safe path segment; a user can't delete their own home root. Does not embedstorage.Driver— every method is explicit so nothing bypasses scoping. ForwardsUsage.auth.perUserHomes(default off → unchanged flat behavior; the dogfood is unaffected until enabled)./s/handler has no user context, so it's given the unscoped store, and share creation resolves the creator's path to its actual location (scope.Resolve) before persisting — so a shared/docs/xis stored as/home/alice/docs/xand served correctly.main.go(after encrypt/quota); admin set built once and reused.Resolve, home-root delete guard, no-user rejection.Consumes the group field from #17. Per-group
/spaces/<group>(#16 cont.) builds on this next. Minor known cosmetic:GET /sharesshows the stored actual path to the creator; display-unscoping is a small follow-up.