openedx / openedx/openedx-authz

Bug: Assignment rollback doesn't invalidate in memory cache

Open
#304 0 comments 0 reactions 1 assignee View on GitHub

@bmtcril is already working on this.

Since May 28, 2026.

Dominant language
Python
Stars
0
Forks
9
Avg merge
13d 9h
Merged PRs (30d)
9

Description

When assign_role_to_subject_in_scope() rolls back via transaction.atomic(), the in-memory model retains the grant but invalidate_policy_cache() is never called. The stale grant persists indefinitely in that worker until the next write operation. We just need to add invalidate_policy_cache() to the except path.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.