The API passes the record's workspace (and owner/state where the policy needs it) to the access engine, so workspace policies and per-workspace roles take effect.
Evidence
internal/webui/authorize.go:36 builds access.Resource{Kind,ID,Org} with no Workspace. internal/infrastructure/access/engine.go:250 adds the workspace level only when set.
Rules
Read CLAUDE.md. Do only what the Goal and Stop when need. File anything else you notice as a bead; do not fix it. Run task check once at the end; if it fails twice on the same problem, comment on this bead and stop.
Stop when
Requests for a record carry its workspace into Authorize.
A workspace forbid policy denies the action on that workspace's records through the API (one table-driven test in the access seam).
A workspace-scoped role overrides the org role.
Then commit (Conventional Commits, scoped by package), bd close this bead and stop.
Imported from beads archie-core-kgxw.9 · GitHub #1322 · type feature · priority P2 · created 2026-10-05 · closed 2026-10-11
## Goal
The API passes the record's workspace (and owner/state where the policy needs it) to the access engine, so workspace policies and per-workspace roles take effect.
## Evidence
internal/webui/authorize.go:36 builds access.Resource{Kind,ID,Org} with no Workspace. internal/infrastructure/access/engine.go:250 adds the workspace level only when set.
## Rules
Read CLAUDE.md. Do only what the Goal and Stop when need. File anything else you notice as a bead; do not fix it. Run `task check` once at the end; if it fails twice on the same problem, comment on this bead and stop.
## Stop when
- [ ] Requests for a record carry its workspace into Authorize.
- [ ] A workspace forbid policy denies the action on that workspace's records through the API (one table-driven test in the access seam).
- [ ] A workspace-scoped role overrides the org role.
Then commit (Conventional Commits, scoped by package), `bd close` this bead and stop.
### Close reason
Fixed on feat/org-epic (PR #1634)
---
_Imported from beads `archie-core-kgxw.9` · GitHub #1322 · type feature · priority P2 · created 2026-10-05 · closed 2026-10-11_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
The API passes the record's workspace (and owner/state where the policy needs it) to the access engine, so workspace policies and per-workspace roles take effect.
Evidence
internal/webui/authorize.go:36 builds access.Resource{Kind,ID,Org} with no Workspace. internal/infrastructure/access/engine.go:250 adds the workspace level only when set.
Rules
Read CLAUDE.md. Do only what the Goal and Stop when need. File anything else you notice as a bead; do not fix it. Run
task checkonce at the end; if it fails twice on the same problem, comment on this bead and stop.Stop when
Then commit (Conventional Commits, scoped by package),
bd closethis bead and stop.Close reason
Fixed on feat/org-epic (PR #1634)
Imported from beads
archie-core-kgxw.9· GitHub #1322 · type feature · priority P2 · created 2026-10-05 · closed 2026-10-11