Skip to content

capture role_in_org + additional_roles_in_org on fetch_users_in_org#62

Merged
mrmauer merged 1 commit intomainfrom
bug/1021
Jan 22, 2025
Merged

capture role_in_org + additional_roles_in_org on fetch_users_in_org#62
mrmauer merged 1 commit intomainfrom
bug/1021

Conversation

@mrmauer
Copy link
Contributor

@mrmauer mrmauer commented Jan 13, 2025

After PR

When calling fetch_users_in_org, the role information for that org member will be included at the top of the returned UserMetadata. This information is already embedded in org_id_to_org_info, but this provides a better DX and our BE already returns it.

Notably, for every other instance of UserMetadata role_in_org.is_none() and additional_roles_in_org.is_none(), so a new type may make more sense, but I decided to favor the back-compatible fix here.

Tests

Verified the following in an example app:

  1. When using fetch_users_in_org the UserMetadata includes role_in_org: Some("Value") and additional_roles_in_org: Some([]).
  2. When using fetch_user_by_id the UserMetadata has the default role_in_org: None and additional_roles_in_org: None.

Copy link
Contributor

@pfvatterott pfvatterott left a comment

Choose a reason for hiding this comment

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

LGTM

@mrmauer mrmauer merged commit 8483856 into main Jan 22, 2025
@mrmauer mrmauer deleted the bug/1021 branch January 22, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants