Repository navigation
factory: one access core for every organization item (E1, part 1) - #2632
Merged
Merged
Conversation
Every organization item now carries one access shape (owner, shares to people or teams with view|comment|edit|full, private), and serve/item_access.go decides it: roleOf, can, nameOnly, and the event audience. Workstreams read their access through it; the old teams-only shared_with is folded into edit shares on read. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
This was referenced Nov 13, 2026
Merged
Merged
ZeroPoint95
pushed a commit
that referenced
this pull request
Nov 24, 2026
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
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.
Wave-2 lane E1, part 1 — the shape other lanes build on. Contract:
~/work/teams-wave/WAVE2.md§3 E1 as amended by §4.1.What lands
internal/factory/share.go:factory.Share{kind:"person"|"team", id, role}, rolesview < comment < edit < full,RoleRank,HigherRole.internal/factory/serve/item_access.go(the contract saidaccess.go; that file is already the sign-in sessions):Item{Kind,ID,Owner,Shares,Private},Viewer,h.itemViewer(r),roleOf,can(viewer,item,verb),nameOnly,audienceOf(...)/v.hears(a)for events,h.cleanShares,workstreamItem,h.workstreamCan(r, wsID, verb)(E5's shape).wsVieweris now an alias;canSee/canWrite/canGovern= view / edit / full-or-operator-on-non-private).OrgWorkstreamgainsshares+private; the oldshared_withis folded intoeditshares on every store read. Events carry an audience fromaudienceOf, so a private item's events never reach the operator.No wire change in this part:
shared_withis still answered (the team ids ofshares). Part 2 adds thesharesPUT,private,my_role, the name-only row, holes 5–7 andengine_features += org_roles.Proof
make test-focus PKGS=./internal/factory/serve RUN='Workstream|Policy|GoAhead|Team|Event|AccessCore|ItemAudience|BeforeRoles'green.TestTheAccessCoreRanksRolesFromOwnerSharesAndPrivacy,TestItemAudienceFollowsAccess,TestAWorkstreamSharedBeforeRolesReadsAsEditShares.