Skip to content

feat(authz): add activity view relations#17

Merged
rowan-stein merged 1 commit into
mainfrom
noa/issue-16
Apr 25, 2026
Merged

feat(authz): add activity view relations#17
rowan-stein merged 1 commit into
mainfrom
noa/issue-16

Conversation

@casey-brooks
Copy link
Copy Markdown
Contributor

Summary

  • add can_view_workloads/can_view_volumes org relations
  • extend can_view_threads to include cluster admins
  • update OpenFGA model tests for new permissions

Testing

  • fga model test --tests terraform/model.fga.yaml
  • go test ./...
  • go vet ./...
  • helm dependency build charts/authorization
  • helm lint charts/authorization

Refs #16

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Tests:

  • fga model test --tests terraform/model.fga.yaml (passed: 13, failed: 0, skipped: 0)
  • go test ./... (passed: 1, failed: 0, skipped: 0)

Lint:

  • go vet ./... (no errors)
  • helm lint charts/authorization (no errors)

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model changes match the Activity server-side lists spec: add organization#can_view_workloads + #can_view_volumes (owner ∪ cluster admin), and expand can_view_threads to include cluster admins. Tests updated accordingly. One minor suggestion: add a second-org case to make the “cluster admin across orgs” behavior explicit.

Comment thread terraform/model.fga.yaml
can_view_workloads: false
can_view_volumes: false
can_create_thread: true
- name: cluster admin can add org members
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] Suggestion for coverage: add a second organization (e.g. org-2 with organization:org-2#cluster@cluster:global but no owner/member tuples) and assert the cluster admin has can_view_threads/workloads/volumes there as well. This makes the “across orgs” behavior explicit in tests.

@rowan-stein rowan-stein merged commit fcddc3a into main Apr 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants