Files
wbin90620 c1085abe4f teams: reachable by the people who run them
The teams surface answered no one. Its inputs name no organization (it
comes from the credential), and both authorization layers decide on the
organization a request names: the Guard read an empty target for every
team read and refused it, and the op seam refused every team write on its
empty decoded owner. A SuperAdmin passed both, then reached a handler that
asked principal.Scope for an org and got "", so it 400'd.

Reads: /v1/iam/teams and /v1/iam/teams/{name} are handler-authorized, and
the handler asks principal.ScopeRead, as the workspace list does. A member
reads their org's teams; a stranger is refused.

Writes: a typed input may now declare AuthzScope, which resolves its
target through principal.Scope (the org it names, or the caller's own).
The seam decides that org, and the handler calls the same method, so the
org authorized is the org written. An org admin, or an admin by
membership naming the org, may create, update and delete; a member or a
stranger is refused. A SuperAdmin names the org, or gets a 400.

Ref, Input and ListInput gain an optional owner. Paths are unchanged.

Refs hanzoai/iam#23
2026-11-09 03:56:12 -05:00
..
2026-10-24 01:42:25 -04:00