feat(frontier): add SetProjectMemberRole RPC#456
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded a new RPC method Sequence Diagram(s)sequenceDiagram
participant Client
participant FrontierService
participant RoleStore
participant Database
Client->>FrontierService: SetProjectMemberRole(request)
FrontierService->>RoleStore: Validate request & authorize caller
RoleStore->>Database: Upsert member-role for project (project_id, principal_id, principal_type, role_id)
Database-->>RoleStore: Persisted
RoleStore-->>FrontierService: Acknowledgment
FrontierService-->>Client: SetProjectMemberRoleResponse
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
f51485d to
c56df54
Compare
|
The latest Buf updates on your PR. Results from workflow Validate / validate (pull_request).
|
c56df54 to
5a189cc
Compare
Support user, service user, and group principals via principal_id and principal_type fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5a189cc to
22a0b96
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@raystack/frontier/v1beta1/frontier.proto`:
- Around line 2063-2068: The validation options on SetProjectMemberRoleRequest
are using the wrong extension (validate.rules); update each field to use the
buf.validate.field extension like the SetOrganizationMemberRoleRequest example:
replace occurrences such as [(validate.rules).string.uuid = true] with
[(buf.validate.field).string.uuid = true] for project_id, principal_id and
role_id, and replace [(validate.rules).string.min_len = 1] with
[(buf.validate.field).string.min_len = 1] for principal_type so the proto uses
buf.validate.field for all field validations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d16751c9-86b4-4eb6-903a-7280dd01528e
📒 Files selected for processing (1)
raystack/frontier/v1beta1/frontier.proto
Summary
SetProjectMemberRoleRPC for atomic role assignment on project membersRelated: raystack/frontier#1461
🤖 Generated with Claude Code