feat: Add permissions support#1456
Merged
csrbarber merged 3 commits intofeature/ent-4798-workos-node-organization-rolesfrom Feb 5, 2026
Merged
feat: Add permissions support#1456csrbarber merged 3 commits intofeature/ent-4798-workos-node-organization-rolesfrom
csrbarber merged 3 commits intofeature/ent-4798-workos-node-organization-rolesfrom
Conversation
Contributor
Greptile OverviewGreptile SummaryThis PR adds comprehensive CRUD (Create, Read, Update, Delete, List) operations for permissions to the Authorization module, mirroring the existing patterns for environment roles and organization roles. Key changes:
The implementation follows established conventions in the codebase and includes proper type safety throughout. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Authorization
participant WorkOS API
Note over Client,WorkOS API: Create Permission
Client->>Authorization: createPermission(options)
Authorization->>Authorization: serializeCreatePermissionOptions(options)
Authorization->>WorkOS API: POST /authorization/permissions
WorkOS API-->>Authorization: PermissionResponse
Authorization->>Authorization: deserializePermission(data)
Authorization-->>Client: Permission
Note over Client,WorkOS API: List Permissions
Client->>Authorization: listPermissions(options?)
Authorization->>WorkOS API: GET /authorization/permissions?query
WorkOS API-->>Authorization: PermissionListResponse
Authorization->>Authorization: map(deserializePermission)
Authorization-->>Client: PermissionList
Note over Client,WorkOS API: Get Permission
Client->>Authorization: getPermission(slug)
Authorization->>WorkOS API: GET /authorization/permissions/{slug}
WorkOS API-->>Authorization: PermissionResponse
Authorization->>Authorization: deserializePermission(data)
Authorization-->>Client: Permission
Note over Client,WorkOS API: Update Permission
Client->>Authorization: updatePermission(slug, options)
Authorization->>Authorization: serializeUpdatePermissionOptions(options)
Authorization->>WorkOS API: PATCH /authorization/permissions/{slug}
WorkOS API-->>Authorization: PermissionResponse
Authorization->>Authorization: deserializePermission(data)
Authorization-->>Client: Permission
Note over Client,WorkOS API: Delete Permission
Client->>Authorization: deletePermission(slug)
Authorization->>WorkOS API: DELETE /authorization/permissions/{slug}
WorkOS API-->>Authorization: 204 No Content
Authorization-->>Client: void
|
mattgd
reviewed
Jan 30, 2026
src/authorization/interfaces/list-permissions-options.interface.ts
Outdated
Show resolved
Hide resolved
3276b31 to
e9d9c3c
Compare
f03d22b to
d061263
Compare
e9d9c3c to
dd74cd1
Compare
## Description Removes the `expand` parameter from `listOrganizationRoles` and `listEnvironmentRoles`. ## Documentation Does this require changes to the WorkOS Docs? E.g. the [API Reference](https://workos.com/docs/reference) or code snippets need updates. ``` [X] Yes ``` If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
0832b71 to
8750771
Compare
34f5e08
into
feature/ent-4798-workos-node-organization-roles
8 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.
Description
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.