Skip to content

Raz/per 6256 implement approve user method in sdks - #43

Closed
RazcoDev wants to merge 6 commits into
mainfrom
raz/per-6256-implement-approve-user-method-in-sdks
Closed

RazcoDev wants to merge 6 commits into
mainfrom
raz/per-6256-implement-approve-user-method-in-sdks

Conversation

@RazcoDev

@RazcoDev RazcoDev commented Jul 2, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@zeevmoney

Copy link
Copy Markdown
Member

Thanks @RazcoDev for the early work here, and @asafc for the review. Invite approval has since shipped in the SDK through #117, #118, #119 and #120, as a dedicated user_invites API rather than a method on users. It's available on both the async and sync clients:

from permit.api.models import ElementsUserInviteApprove

user = await permit.api.user_invites.approve(
    user_invite_id=invite.id,
    approve_data=ElementsUserInviteApprove(email="alice@example.com", key="alice", attributes={}),
)

It calls the same /v2/facts/{project}/{environment}/user_invites/{user_invite_id}/approve endpoint this PR targets, and returns a UserRead. attributes is currently required by the model, so pass {} when you don't need any.

The branch also conflicts with main now: the required_permissions / required_context decorators it uses were removed in a later refactor. So I'm closing this in favor of the shipped API. Thanks again!

@zeevmoney zeevmoney closed this Sep 28, 2026
@linear-code

linear-code Bot commented Sep 28, 2026

Copy link
Copy Markdown

RDA-130

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.

3 participants