Skip to content

fix(organizations): enforce active membership on async member reads - #743

Draft
aldoruizluna wants to merge 1 commit into
mainfrom
fix/member-read-active-membership
Draft

aldoruizluna wants to merge 1 commit into
mainfrom
fix/member-read-active-membership

Conversation

@aldoruizluna

Copy link
Copy Markdown
Collaborator

What this changes

Cherry-pick (-x, unchanged) of b21d81a2 (fix(organizations): enforce active membership on async member reads) onto current main:

  • Organization member reads use the mounted AsyncSession contracts and serialize persisted membership fields, so they are no longer served from the Redis-cached self.db.query path.
  • Inactive memberships are excluded from organization reads, including list_organizations, which now requires status == "active".
  • Profile data and platform bypass are kept out of tenant rosters.
  • New tests: apps/api/tests/unit/services/test_organization_member_reads.py.

History

The commit was pushed on 2026-10-03 (its commit date) by an earlier agent session on fix/member-read-api-2026-10-03, which never had a PR of its own. That branch's first three commits shipped through #687 and #691; this is the remaining one. Opened as a draft on a fresh branch during the 2026-10-21 wrap-up.

Merge status

Based on current main; the pick applied cleanly. One hunk (an import reorder in organizations/dependencies.py) was already on main and dropped out. Every touched file except organizations/core.py is byte-identical to the original commit; core.py differs only by later, unrelated changes on main (#718).

Review needed

Code review of the access-control change: active-membership filtering on every member/organization read, and how it interacts with #718's creator-membership and invitation changes. Merging ships the API through the normal release path.

🤖 Generated with Claude Code

Use mounted AsyncSession contracts, serialize persisted membership fields, and exclude inactive memberships from organization reads. Keep profile data and platform bypass out of tenant rosters.

Co-Authored-By: Codex <noreply@openai.com>

Session: codex://threads/01a10513-8bed-7b40-92e8-5eac783dca16
(cherry picked from commit b21d81a)
@github-actions

Copy link
Copy Markdown
Contributor

📚 Documentation checks found issues. Please review the maintenance script output.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Code quality checks found issues. Please review the maintenance script output.

@github-actions

Copy link
Copy Markdown
Contributor

Security Scan Summary

Date: Wed Oct 21 01:24:28 UTC 2026
Commit: c299795

Scan Results

  • CodeQL: success
  • Python Security: success
  • JavaScript Security: success
  • Secrets Scan: success
  • Container Scan: success
  • DAST ZAP: skipped

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Playwright E2E Test Results

  • Total: 11
  • Passed: 11 ✅
  • Failed: 0 ❌
  • Flaky: 0 ⚠️
  • Skipped: 0 ⏭️

Full Report

This branch has not been deployed

No deployments
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.

1 participant