feat(frontier): add SetOrganizationMemberRole RPC#453
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
raystack/frontier/v1beta1/frontier.proto (1)
1934-1940: Consider aligning field naming with peer messages.The use of
org_iddiffers from similar messages likeRemoveOrganizationUserRequestandAddOrganizationUsersRequestwhich useidfor the organization identifier:// RemoveOrganizationUserRequest uses `id` for org: message RemoveOrganizationUserRequest { string id = 1 [(validate.rules).string.min_len = 3]; string user_id = 2; }However, using
org_idis more explicit and self-documenting, especially since this message contains three distinct ID fields (org_id,user_id,role_id). If this is a deliberate choice for clarity, the implementation is acceptable.The validation rules (
min_len = 3) are consistent with existing patterns, and the empty response message aligns with similar operations.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@raystack/frontier/v1beta1/frontier.proto` around lines 1934 - 1940, Rename the org_id field in message SetOrganizationMemberRoleRequest to id to match peer messages (e.g., RemoveOrganizationUserRequest/AddOrganizationUsersRequest): replace org_id with id while keeping the existing validation tag [(validate.rules).string.min_len = 3]; update any references in RPC handlers, serializers, tests, and generated code that currently reference SetOrganizationMemberRoleRequest.org_id to use SetOrganizationMemberRoleRequest.id to avoid breakage; leave user_id and role_id unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@raystack/frontier/v1beta1/frontier.proto`:
- Around line 1934-1940: Rename the org_id field in message
SetOrganizationMemberRoleRequest to id to match peer messages (e.g.,
RemoveOrganizationUserRequest/AddOrganizationUsersRequest): replace org_id with
id while keeping the existing validation tag [(validate.rules).string.min_len =
3]; update any references in RPC handlers, serializers, tests, and generated
code that currently reference SetOrganizationMemberRoleRequest.org_id to use
SetOrganizationMemberRoleRequest.id to avoid breakage; leave user_id and role_id
unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: afe1cd27-e0a1-4a9d-bd15-ed72f32b4039
📒 Files selected for processing (1)
raystack/frontier/v1beta1/frontier.proto
Adds a new RPC for atomic role assignment to organization members. Replaces the multi-step listPolicies -> deletePolicy -> createPolicy flow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1af5125 to
d835560
Compare
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Updated all three fields to use UUID validation as suggested. |
Summary
Adds
SetOrganizationMemberRoleRPC for atomic role assignment to org members.Related
🤖 Generated with Claude Code
Summary by CodeRabbit