feat: Add RBAC organization roles API support#339
Merged
gjtorikian merged 5 commits intofeature/ent-4805-workos-php-environment-rolesfrom Mar 6, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR completes Part 3 of RBAC support by adding 7 organization role endpoints to the Key changes:
Notable observations:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant RBAC
participant Client
participant API
Caller->>RBAC: createOrganizationRole(orgId, slug, name, desc?)
RBAC->>Client: POST authorization/organizations/{orgId}/roles
Client->>API: HTTP POST
API-->>Client: OrganizationRole JSON
Client-->>RBAC: decoded array
RBAC-->>Caller: Resource\OrganizationRole
Caller->>RBAC: listOrganizationRoles(orgId)
RBAC->>Client: GET authorization/organizations/{orgId}/roles
Client->>API: HTTP GET
API-->>Client: list JSON {data: [...]}
Client-->>RBAC: decoded array
RBAC-->>Caller: [Resource\Role[]]
Caller->>RBAC: getOrganizationRole(orgId, slug)
RBAC->>Client: GET authorization/organizations/{orgId}/roles/{slug}
Client->>API: HTTP GET
API-->>Client: Role JSON
Client-->>RBAC: decoded array
RBAC-->>Caller: Resource\Role
Caller->>RBAC: updateOrganizationRole(orgId, slug, name?, desc?)
RBAC->>Client: PATCH authorization/organizations/{orgId}/roles/{slug}
Client->>API: HTTP PATCH
API-->>Client: OrganizationRole JSON
Client-->>RBAC: decoded array
RBAC-->>Caller: Resource\OrganizationRole
Caller->>RBAC: setOrganizationRolePermissions(orgId, slug, perms[])
RBAC->>Client: PUT authorization/organizations/{orgId}/roles/{slug}/permissions
Client->>API: HTTP PUT
API-->>Client: OrganizationRole JSON
Client-->>RBAC: decoded array
RBAC-->>Caller: Resource\OrganizationRole
Caller->>RBAC: addOrganizationRolePermission(orgId, roleSlug, permSlug)
RBAC->>Client: POST authorization/organizations/{orgId}/roles/{roleSlug}/permissions
Client->>API: HTTP POST
API-->>Client: OrganizationRole JSON
Client-->>RBAC: decoded array
RBAC-->>Caller: Resource\OrganizationRole
Caller->>RBAC: removeOrganizationRolePermission(orgId, roleSlug, permSlug)
RBAC->>Client: DELETE authorization/organizations/{orgId}/roles/{roleSlug}/permissions/{permSlug}
Client->>API: HTTP DELETE
API-->>Client: empty response
Client-->>RBAC: []
RBAC-->>Caller: []
Last reviewed commit: 78ed5d7 |
4b70773 to
e747c7e
Compare
9c0f184 to
22a8ef5
Compare
e747c7e to
09ec30b
Compare
eb3d554 to
5076e17
Compare
Add organization role CRUD endpoints plus set/add/remove permissions to the RBAC module. Introduces OrganizationRole resource for mutation return types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
09ec30b to
6144b3d
Compare
5076e17 to
47a73b7
Compare
gjtorikian
approved these changes
Mar 6, 2026
a771a1a
into
feature/ent-4805-workos-php-environment-roles
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RBACmodule:createOrganizationRole,listOrganizationRoles,getOrganizationRole,updateOrganizationRole,setOrganizationRolePermissions,addOrganizationRolePermission,removeOrganizationRolePermissionRole— no separate resource class needed since the API returns"object": "role"for all role typesOrganizations::listOrganizationRolesPart 3 of 3 for RBAC support. Stacked on #338.
Test plan
🤖 Generated with Claude Code