We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76fdce3 commit a56368aCopy full SHA for a56368a
1 file changed
common/djangoapps/student/roles.py
@@ -533,9 +533,10 @@ def _authz_get_orgs_for_user(self, user) -> list[str]:
533
Returns a list of org short names for the user with given role.
534
AuthZ compatibility layer
535
"""
536
- # TODO: This will be implemented on Milestone 1
537
- # of the Authz for Course Authoring project
538
- return []
+ role = get_authz_role_from_legacy_role(self._role_name)
+ assignments = authz_api.get_user_role_assignments_for_role(user.username, role)
+ orgs = {assignment.scope.org for assignment in assignments if assignment.scope.org is not None}
539
+ return list(orgs)
540
541
def _legacy_get_orgs_for_user(self, user) -> list[str]:
542
0 commit comments