-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat(organizations): create endpoints to handle organization invitations #5395
base: main
Are you sure you want to change the base?
feat(organizations): create endpoints to handle organization invitations #5395
Conversation
092d932
to
64a2b55
Compare
64a2b55
to
1139076
Compare
1139076
to
c28ad37
Compare
@rajpatel24 Wuld that whole invite object be present in |
FAILED = 'failed' | ||
IN_PROGRESS = 'in_progress' | ||
PENDING = 'pending' | ||
RESENT = 'resent' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajpatel24 What's the difference between in_progress
and pending
?
Edit: looking more at this list, I think it would be very useful if you'd describe each of these statuses - like what action triggers them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magicznyleszek As of now, we're not using in_progress
as a status for organization invitations. I included it as a possible choice, along with completed
and failed
, in case the need arises in the future. Once @noliveleger is back (probably today), I'll discuss this with him. Currently, when the organization owner sends an invitation, the status is set to pending
. When the invitee accepts the invitation, the status changes to accepted
in the OrganizationInvitation
table.
Additionally, when a user accepts an invitation, we trigger an async task to transfer their projects to the organization. This is part of the existing functionality we're reusing for project transfers along with organization invitations. It uses its own project-ownership/Invite
table with different statuses, which you might already be familiar with.
So, my question for @noliveleger would be: when the project transfer is completed and the status in the project-ownership/Invite
table is set to completed
, do we also need to set the status to completed
in the OrganizationInvitation
table, or is the accepted
state sufficient?
To summarize, the /api/v2/organizations/:organization_id/invites/
API will currently have the following statuses: pending
, accepted
, declined
, cancelled
, expired
, and resent
.
If any changes occur regarding this, I'll make sure to update you right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajpatel24 , accepted
would be enough for OrganizationInvitation
.
@magicznyleszek No, the invite object would not be present there. I don't think it's necessary since The |
31ac077
to
ea9a6bd
Compare
32b1431
to
5394358
Compare
🗒️ Checklist
<type>(<scope>)<!>: <title> TASK-1234
frontend
orbackend
unless it's global📣 Summary
Implemented endpoints for organization invitations, allowing organization owners to invite existing users or unregistered users to join their organization. The invitee can either accept or decline the invitation. If the invitee accepts, their assets will be transferred to the organization.
📖 Description
member
,admin
). Default ismember
.Payload:
Response:
Response:
Payload:
Response:
Response: 204