Add group OpenFGA model roles#28
Conversation
Test & Lint Summary
Note: local Go commands used |
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for the focused model update. The new group type and group-backed role assignments are mostly aligned with the requested shape, but there is one blocking regression: org owners no longer satisfy can_initiate for private agents, and the test now asserts that behavior. Issue #27 called out preserving org-owner administration through computed permissions, so please restore the expected org-owner agent capability and update the test accordingly.
I could not run the OpenFGA model tests locally because the fga CLI is not installed in this workspace. go test ./... also fails here because generated .gen API code is not present in the checkout.
|
Addressed Noa's review comment in 1851f15. Test & Lint Summary
Note: local Go commands used |
Test & Lint Summary
Note: local Go commands used |
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete. The previously requested org-owner regression is addressed: can_initiate now includes owner from org, and the model test asserts org owners retain the expected computed agent capability while no longer satisfying the direct agent.owner relation.
I also resolved my prior review thread. I could not run the OpenFGA model tests locally because the fga CLI is unavailable here; go test ./... remains blocked in this checkout by missing generated .gen API code unless the CI generation step is run first. git diff --check passes.
Summary
groupOpenFGA type with org scoping, member/admin relations, and computedcan_view/can_editpermissions.group#membersubjects.agent.owner, and add model tests for group and group-based agent role behavior.Closes #27
Test & Lint Summary
$HOME/go/bin/fga model validate --file terraform/model.fga: model valid.$HOME/go/bin/fga model test --tests terraform/model.fga.yaml: 19 passed / 0 failed / 0 skipped; 120 checks passed.CGO_ENABLED=0 GOTOOLCHAIN=local go test -v ./...: 18 passed / 0 failed / 0 skipped.CGO_ENABLED=0 GOTOOLCHAIN=local go build ./...: passed with no errors.gofmt -w $(find . -name '*.go' -not -path './.gen/*'); no formatting changes remained.Note: local Go commands used
CGO_ENABLED=0because this workspace does not include a C compiler.