Skip to content

fix: require OID when using --check-perm in auth whoami#269

Merged
maximelb merged 1 commit intocli-v2from
cli-v2-check-perm-require-oid
Mar 29, 2026
Merged

fix: require OID when using --check-perm in auth whoami#269
maximelb merged 1 commit intocli-v2from
cli-v2-check-perm-require-oid

Conversation

@maximelb
Copy link
Copy Markdown
Contributor

Summary

  • limacharlie auth whoami --check-perm <perm> now fails early with a clear error if no OID is specified
  • Without an OID the permission check is ambiguous — this makes the requirement explicit

Test plan

  • New unit test test_whoami_check_perm_requires_oid verifies the error
  • Existing --check-perm tests (with OID set) still pass

🤖 Generated with Claude Code

Checking a specific permission without an OID is ambiguous and can
return misleading results. Fail early with a clear error message
telling the user to specify --oid or set LC_OID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@maximelb maximelb requested a review from dzimine-lc March 29, 2026 22:15
@maximelb maximelb marked this pull request as ready for review March 29, 2026 22:15
@maximelb maximelb merged commit 1057f21 into cli-v2 Mar 29, 2026
7 checks passed
@maximelb maximelb deleted the cli-v2-check-perm-require-oid branch March 29, 2026 22:24
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