Skip to content

Comments

FGA_4: list/assign/remove role, remove roleAssginment#570

Draft
swaroopAkkineniWorkos wants to merge 1 commit intoENT-5224-python-sdk-for-fga-worktree-fuck-aroundfrom
fga-pr4
Draft

FGA_4: list/assign/remove role, remove roleAssginment#570
swaroopAkkineniWorkos wants to merge 1 commit intoENT-5224-python-sdk-for-fga-worktree-fuck-aroundfrom
fga-pr4

Conversation

@swaroopAkkineniWorkos
Copy link

Description

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@swaroopAkkineniWorkos
Copy link
Author

@greptile review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 21, 2026

Greptile Summary

Adds role assignment management functionality to the Authorization module, implementing list, assign, and remove operations.

  • Adds list_role_assignments() with pagination support for querying role assignments by organization membership
  • Adds assign_role() to create new role assignments via role slug
  • Adds remove_role() to delete role assignments by role slug using DELETE with body
  • Adds remove_role_assignment() to delete role assignments by ID using standard DELETE
  • Implements both sync and async versions consistently
  • Includes comprehensive test coverage for all operations including auto-pagination

Note: The PR title contains a typo "roleAssginment" (should be "roleAssignment")

Confidence Score: 5/5

  • Safe to merge - well-structured implementation following established patterns
  • Code follows existing patterns in the codebase for similar operations, includes proper sync/async implementations, comprehensive test coverage, correct pagination handling, and adheres to security best practices
  • No files require special attention

Important Files Changed

Filename Overview
src/workos/authorization.py Adds role assignment methods (list, assign, remove) with proper sync/async implementations and pagination support
tests/test_authorization_role_assignments.py Comprehensive test coverage for all role assignment operations including pagination

Last reviewed commit: bf7b6a2

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant