Skip to content

feat(cloud): manage organization custom roles - #744

Merged
sdairs merged 1 commit into
stack/595-clickpipe-create-fieldsfrom
stack/577-org-roles
Sep 7, 2026
Merged

feat(cloud): manage organization custom roles#744
sdairs merged 1 commit into
stack/595-clickpipe-create-fieldsfrom
stack/577-org-roles

Conversation

@sdairs

@sdairs sdairs commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Organization role IDs were required by member, invitation, and API-key commands, but the CLI could neither discover nor manage those roles. This adds cloud org role list|get|create|update|delete over the five existing GA API methods.

Create and update accept the complete typed role request as a JSON file or stdin, including actors, multiple policies, ALLOW/DENY, resources, permissions, grants, and roleV2 tags. Input rejects unknown fields at every nesting level and rejects unknown enum values before HTTP. Updates are partial: omitted fields stay unchanged, while supplied actor and policy arrays replace their complete lists. List/get support OAuth; writes fail fast unless API-key authentication is active. Human output preserves the system/custom distinction and tolerates sparse responses, while JSON output returns the typed API data.

The README now documents role discovery and a complete nested custom-role workflow, and member/invitation/key help points to cloud org role list for role IDs.

Validation:

  • cargo fmt --all
  • cargo clippy -p clickhousectl -- -D warnings
  • cargo check -p clickhousectl --no-default-features
  • cargo clippy -p clickhousectl --all-targets --no-default-features -- -D warnings
  • cargo test -p clickhousectl

Closes #577.

@sdairs sdairs added this to the v0.5.0 milestone Sep 5, 2026
@sdairs sdairs linked an issue Sep 5, 2026 that may be closed by this pull request

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sdairs
sdairs merged commit e4a5c8b into main Sep 7, 2026
10 checks 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.

Expose organization custom roles (list/get/create/update/delete)

2 participants