Skip to content

feat(frontier): add optional relation field to RemovePlatformUserRequest#489

Merged
rohilsurana merged 1 commit into
mainfrom
feat/remove-platform-user-relation
Jun 29, 2026
Merged

feat(frontier): add optional relation field to RemovePlatformUserRequest#489
rohilsurana merged 1 commit into
mainfrom
feat/remove-platform-user-relation

Conversation

@rohilsurana

Copy link
Copy Markdown
Member

What

Adds an optional relation field (field number 3) to RemovePlatformUserRequest in raystack/frontier/v1beta1/admin.proto.

message RemovePlatformUserRequest {
  string user_id = 1;
  string serviceuser_id = 2;

  // relation scopes the removal to a single platform relation (admin or member).
  // When empty, all platform relations of the principal are removed.
  string relation = 3;
}

Unlike the sibling AddPlatformUserRequest.relation, this field is optional (not REQUIRED): an empty relation must preserve today's behavior of removing the principal entirely.

Why

This unblocks relation-selective platform-user removal in Frontier. Today Frontier's RemovePlatformUser strips both the admin (superuser) and member (check) platform relations because the request has no relation field, so there is no way to demote an admin down to member or remove just one relation via the API.

Adding this optional field lets callers target a single relation (admin or member) while the empty default stays 100% backward compatible. It is a prerequisite for a declarative platform-user reconciler in Frontier, which must converge (principal, relation) pairs precisely. Frontier regenerates its Go stubs from this repo, so the field must land here first.

Backward compatibility

  • New optional proto3 scalar field, additive only. Wire-compatible.
  • buf lint and buf format pass.

@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Validate / validate (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJun 29, 2026, 11:54 AM

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6ce44b9e-4c1b-4dd6-9bde-69813766d454

📥 Commits

Reviewing files that changed from the base of the PR and between 795c70f and df63535.

📒 Files selected for processing (1)
  • raystack/frontier/v1beta1/admin.proto

📝 Walkthrough

Walkthrough

In admin.proto, the RemovePlatformUserRequest message gains a new optional string relation = 3 field. Documentation on the field states that when provided, the removal is scoped to that specific platform relation type; when left empty, all platform relations for the principal are removed.

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding an optional relation field to RemovePlatformUserRequest.
Description check ✅ Passed The description is directly related to the changeset and explains the new field, behavior, and motivation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohilsurana rohilsurana merged commit ee05c27 into main Jun 29, 2026
3 checks passed
@rohilsurana rohilsurana deleted the feat/remove-platform-user-relation branch June 29, 2026 12:01
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