Auth Users Me Retrieve
Authentication
Response
Serializer for organization user roles.
Security Note: Privilege escalation prevention is handled at the VIEW level
(OrganizationMemberView), not here. This serializer is used by org admins to
update member roles, so fields (role, permissions_override, …) must remain
writable. The view gates all writes on org admin via
is_requiring_org_admin_for_write = True — a member cannot PATCH their own
row to escalate. Any new write path using this serializer MUST apply the same
admin gate, since the fields here are privilege-defining.
DEV-10098: the “Customize retention policy” toggle IS the override’s presence.
Organization.is_custom_retention_enabled was never read by
enforce_data_retention — the cron only ever min()s
logs_retention_period_in_days with the plan window — so switching the
toggle off left the stale override silently hard-deleting on the old (shorter)
window while the page claimed the plan default. The column is retired; the wire
field of the same name keeps its shape but is now DERIVED from the override, so
what the page renders is what the cron enforces.
active- Activeblocked- Blocked