Skip to content

Conversation

@samuelallan72
Copy link
Member

We previously fixed this when the CourseLimitedStaffRole was applied to a course but did not handle the case where the role is applied to a user for a whole org. The underlying issue is that the CourseLimitedStaffRole is a subclass of the CourseStaffRole and much of the system assumes that subclesses are for giving more access not less access.

To prevent that from happening for the case of the CourseLimitedStaffRole, when we do CourseStaffRole access checks, we use the strict_role_checking context manager to ensure that we're not accidentally granting the limited_staff role too much access.

(cherry picked from commit 9091801)

We previously fixed this when the CourseLimitedStaffRole was applied to
a course but did not handle the case where the role is applied to a user
for a whole org.  The underlying issue is that the CourseLimitedStaffRole
is a subclass of the CourseStaffRole and much of the system assumes that
subclesses are for giving more access not less access.

To prevent that from happening for the case of the CourseLimitedStaffRole,
when we do CourseStaffRole access checks, we use the strict_role_checking
context manager to ensure that we're not accidentally granting the
limited_staff role too much access.

(cherry picked from commit 9091801)
@samuelallan72 samuelallan72 self-assigned this Jan 19, 2026
@Cup0fCoffee
Copy link
Member

@samuelallan72 for "Files changed" only shows changes in the tests. I checked the target branch, and looks like the fix is already present in it. Feel free to merge this.

@samuelallan72
Copy link
Member Author

@Cup0fCoffee ah oops, I missed that this was already backported here. I'll close this, as I see the test changes are simply introducing duplicate tests...

@samuelallan72 samuelallan72 deleted the samuel/security-patch-sumac-krach branch January 19, 2026 23:29
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.

4 participants