-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(org member invite): OrganizationMemberInviteDetails DELETE endpoint #88587
base: mifu67/member-invite/omi-details-put
Are you sure you want to change the base?
feat(org member invite): OrganizationMemberInviteDetails DELETE endpoint #88587
Conversation
audit_data = invited_member.get_audit_log_data() | ||
event_name = "INVITE_REMOVE" if invited_member.invite_approved else "INVITE_REQUEST_REMOVE" | ||
with transaction.atomic(router.db_for_write(OrganizationMemberInvite)): | ||
invited_member.delete() |
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.
I think I unfortunately need to move this to a method on the model to support rejecting an invite request via slack ;_;
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
…r-invite/omi-details-delete
return Response({"detail": ERR_INSUFFICIENT_ROLE}, status=400) | ||
else: | ||
if not request.access.has_scope("member:admin"): | ||
if not organization.flags.disable_member_invite and request.access.has_scope( |
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.
This is taken from the old endpoint. However, does it make sense to prohibit deleting invites if member invite is disabled? I feel like users should be allowed to delete this invite objects.
Delete an
OrganizationMemberInvite
object from the database. This is used to delete invites and reject invite requests.