Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "role" to organization membership and directory sync user #309

Merged
merged 16 commits into from
Jun 24, 2024

Conversation

ameesha
Copy link
Contributor

@ameesha ameesha commented Jun 24, 2024

Description

Add "role" property to both "organization_membership" (non nullable) and "directory_user" (nullable)

Also added update_organization_membership method
and updated "created_organization_membership" method to accept role_slug

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.

@ameesha ameesha requested review from mattgd, a team and mthadley and removed request for a team June 24, 2024 09:15
@ameesha ameesha merged commit 14285a2 into main Jun 24, 2024
4 checks passed
@ameesha ameesha deleted the add-roles-om-and-dsync branch June 24, 2024 11:00
@ameesha ameesha mentioned this pull request Jun 24, 2024
Comment on lines +869 to +873
def update_organization_membership(organization_membership_id:, role_slug:)
request = put_request(
path: "/user_management/organization_memberships/#{id}",
body: {
organization_membership_id: organization_membership_id,
Copy link

@georg georg Jun 26, 2024

Choose a reason for hiding this comment

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

The API expects an id field in the body, not organization_membership_id.
Also line 871 references an id variable which is not defined in this method.

I suggest renaming the parameter from organization_membership_id to id to keep parity with the delete_organization_membership method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that, fixed in the 5.2.1 patch
https://rubygems.org/gems/workos

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.

3 participants