Skip to content

Add can_manage_organization to the organization type - #44

Open
vitramir wants to merge 1 commit into
mainfrom
can-manage-organization
Open

vitramir wants to merge 1 commit into
mainfrom
can-manage-organization

Conversation

@vitramir

@vitramir vitramir commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

UpdateOrganization and DeleteOrganization are spec'd to check can_manage_organization (authz — Organization Permissions). The relation did not exist, so the service checked owner instead — which no cluster admin holds on any organization, on top of DeleteOrganization checking nothing at all.

Defined the same way as can_manage_members: owner or admin from cluster.

Model tests cover owner (true), member (false), and cluster admin (true). 31/31 tests, 236/236 checks passing.

Part of organization settings and deletion. The Organizations service change that consumes this follows separately.

Renaming an organization, changing its slug, editing its sandbox defaults,
and deleting it are one permission, held by owners and by cluster admins.
Cluster admins hold no tuple on any organization, so the relation includes
admin from cluster rather than requiring owner.
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.

1 participant