Skip to content

fix(cli): let group admins resolve group names - #209

Merged
jgpruitt merged 1 commit into
mainfrom
jgpruitt/group-admin
Aug 9, 2026
Merged

fix(cli): let group admins resolve group names#209
jgpruitt merged 1 commit into
mainfrom
jgpruitt/group-admin

Conversation

@jgpruitt

@jgpruitt jgpruitt commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • resolve single group names through member-accessible principal.resolve
  • preserve admin-only group enumeration for bulk invitation resolution
  • cover group-admin name-based membership management in unit and e2e tests

Testing

  • ./bun test packages/cli/commands/group.test.ts
  • ./bun run check
  • ./bun run check:full

@jgpruitt
jgpruitt requested a review from cevian as a code owner August 9, 2026 19:50
Copilot AI lite review requested due to automatic review settings August 9, 2026 19:50
@jgpruitt
jgpruitt requested a review from murrayju as a code owner August 9, 2026 19:50
@jgpruitt jgpruitt self-assigned this Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CLI’s group-name resolution path so group admins (and other non-space-admin members) can target a group by name via the member-accessible principal.resolve, while preserving admin-only bulk group enumeration for invitation flows.

Changes:

  • Switch me group single-group name resolution from group.list (admin-only) to principal.resolve (member-accessible) via resolveSpacePrincipalId.
  • Add a focused unit test for resolveGroupId to ensure UUID short-circuiting and that group.list is not called.
  • Add an e2e regression test verifying a group admin can manage membership by group name without gaining group list access.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/cli/commands/group.ts Routes single group-name resolution through principal.resolve to enable non-space-admin group admins to manage groups by name.
packages/cli/commands/group.test.ts Unit coverage for the new resolveGroupId behavior (uses principal.resolve, skips network for UUIDs).
e2e/cli.e2e.test.ts E2E coverage ensuring group admins can manage group membership by name while group list remains space-admin-only.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jgpruitt
jgpruitt merged commit c3bb204 into main Aug 9, 2026
7 checks passed
@jgpruitt
jgpruitt deleted the jgpruitt/group-admin branch August 9, 2026 19:54
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.

2 participants