openedx / openedx/openedx-authz
Bug: Roles returned as Users from `get_subjects_for_role_in_scope`
Open
@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 a subject is another role get_subjects_for_role_in_scope returns that role as a UserData instead of filtering it out. The RoleListView REST endpoint will return these UserData entries that are inherited roles as users, which might cause downstream processes to try to use them as usernames in other API calls.
get_subject_role_assignments_for_role_in_scope filters these, we should probably just do the same in get_subjects_for_role_in_scope.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.