fix: roles cache organization case-insensitive - #87
Open
andrey-canon wants to merge 1 commit into
Open
Conversation
andrey-canon
changed the base branch from
and/FUTUREX-1331
to
open-release/verawood.nelp
August 4, 2026 16:54
Co-authored-by: shadinaif <shadinaif@gmail.com>
andrey-canon
force-pushed
the
and/FUTUREX-1487
branch
from
August 4, 2026 17:41
2c8cd14 to
4ffd44c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
RoleCachecomparesorgin a case-sensitive manner while the value oforgis assumed as case-insensitive by the database collation, and by the django admin form. This PR is to fix the issue to makeRoleCachebehave as the rest of the platformTesting instructions
Preperation to test:
test_userdemoorganization:course-v1:Demo+topic1+index1andcourse-v1:demo+topic2+index2. We have the first course with organizationDemoin course-overview instead ofdemo. This is acceptable in the platformBefore the fix:
test_useraninstructoron the entiredemoorganization, the admin will have to grant it course by course. This is becauseCourseAccessRolewill not allow two similar records like[user: test_user, course_id: "", role: instructor, org: demo]and[user: test_user, course_id: "", role: instructor, org: Demo]. The key constraint treatsorgas case-insensitiveAfter the fix:
[user: test_user, course_id: "", role: instructor, org: demo],[user: test_user, course_id: "", role: instructor, org: Demo], or even[user: test_user, course_id: "", role: instructor, org: DEMO]will maketest_useran instructor on all courses as expectedBefore
After
Issue # 1487
Migration PR of #66