mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-15 18:33:52 +00:00
fix: keep blocks out of the authority graph, and sweep what unshare missed
Code review on the previous commit confirmed three ways the block filter inside readUserGroupPerms turned a reversible block into permanent loss: canManagePermission reads the same rows, so a block-suspended grant looked revoked to #revokeDownstream's cascade, to unshare's authority gate, and to invite claiming — deleting re-shares and invites that were supposed to come back on unblock. The scan is now deliberately blind to blocks; a block suspends delivery only (listing, count, fan-out, telling), which the share store filters itself through one shared notBlockedSql fragment owned by UserBlockStore. The team-unshare sweep also now covers what it claimed to: a member's re-share *to another team* is revoked with them (group rows swept in #revokeDownstream, user path included), and the sweep is skipped entirely while another issuer's grant still backs the team — members' re-shares rest on that authority and revoking them would orphan live access. The blanket block-all note in settings now says team shares still arrive, matching what the code deliberately does.
This commit is contained in:
1 parent
9da03555ae
commit
aadcda073d
8 files changed
+265
-86
No files matched your search
@@ -35,7 +35,7 @@ Who to share with. A string containing `@` is treated as an email address, and a
|
||||
|
||||
Where the deployment has [Teams](/Teams/), pass `{ team: uid }` to share with every member of a team the caller belongs to — including anyone added to it later. There is no string form for a team: a bare string is always read as an email or username.
|
||||
|
||||
A team share is never refused for one member's sake, so it does not produce `recipient_not_accepting_shares` — but a member who has blocked the sharer is not reached by it. Nothing you share with the team is listed for them, accessible to them, or announced to them while their block stands; the rest of the team is unaffected, and nothing tells the sharer.
|
||||
A team share is never refused for one member's sake, so it does not produce `recipient_not_accepting_shares` — but a member who has blocked the sharer is not reached by it. Nothing you share with the team is listed, announced, or pushed to them while their block stands; the grant itself is untouched, so lifting the block restores their view without a re-share. The rest of the team is unaffected, and nothing tells the sharer. The blanket "block everyone" switch does not extend to teams the recipient belongs to — blocking the sender, or leaving the team, is what stops those.
|
||||
|
||||
#### `mode` (String) (optional)
|
||||
|
||||
|
||||
@@ -61,8 +61,9 @@ await puter.fs.share({ path, recipient: { team: team.uid }, mode: 'read' });
|
||||
```
|
||||
|
||||
A member who has blocked the sharer is the one exception: while the block
|
||||
stands, that member neither sees nor can open anything the sharer put into the
|
||||
team, and the sharer is not told.
|
||||
stands, nothing that sharer puts into the team is listed or announced to that
|
||||
member, and the sharer is not told. The underlying grant is untouched, so
|
||||
lifting the block restores the member's view.
|
||||
|
||||
See [`puter.fs.share()`](/FS/share/) for the full sharing API.
|
||||
|
||||
|
||||
Reference in new issue
Block a user