Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/sentry/api/endpoints/organization_member/details.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import logging

from django.db import router, transaction
from django.db.models import Q
from drf_spectacular.utils import extend_schema, inline_serializer
Expand Down Expand Up @@ -241,9 +243,23 @@ def put(
if not is_invite_from_user:
return Response({"detail": ERR_MEMBER_INVITE}, status=403)

logger = logging.getLogger(__name__)

# XXX(dcramer): if/when this expands beyond reinvite we need to check
# access level
if result.get("reinvite"):
logger.info(
"organization.member_reinvite",
Copy link
Member

Choose a reason for hiding this comment

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

if you want to check if the member details aren't being updated, don't you also need to know about the current role and teams for the member?

extra={
"organization_id": organization.id,
"user_id": request.user.id,
"member_id": member.id,
"orgRole": result.get("orgRole"),
"role": result.get("role"),
"teams": result.get("teams"),
"teamRoles": result.get("teamRoles"),
},
)
if member.is_pending:
if ratelimits.for_organization_member_invite(
organization=organization,
Expand Down
Loading