Skip to content

feat: add WorkOS RoleClient for role and membership management#2011

Open
tgmendes wants to merge 9 commits intomainfrom
tiago/rbac-workos-client
Open

feat: add WorkOS RoleClient for role and membership management#2011
tgmendes wants to merge 9 commits intomainfrom
tiago/rbac-workos-client

Conversation

@tgmendes
Copy link
Copy Markdown
Contributor

@tgmendes tgmendes commented Mar 27, 2026

Summary

  • Adds RoleClient to the WorkOS third-party package wrapping WorkOS role and membership APIs
  • Supports listing, creating, updating, and deleting org-scoped roles via raw HTTP
  • Supports listing org members, updating member role assignments, and fetching user details via WorkOS SDK
  • Uses a retryable HTTP client (30s timeout) for resilience
  • Exposes NewRoleClientWithEndpoint for hermetic testing against an httptest.Server

Part of the RBAC feature split from #1970.


Open with Devin

@tgmendes tgmendes requested a review from a team as a code owner March 27, 2026 09:54
@tgmendes tgmendes added the enhancement New feature or request label Mar 27, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Mar 27, 2026 2:38pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 27, 2026

🦋 Changeset detected

Latest commit: 68c2fbf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

@blacksmith-sh

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

type UpdateRoleOpts struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Permissions []string `json:"permissions,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we want to pass permissions to workos? That was wrong in the original pr

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@qstearns qstearns left a comment

Choose a reason for hiding this comment

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

Clean!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants