Skip to content

Commit

Permalink
Merge pull request #9453 from rtibbles/assigned_coach_only
Browse files Browse the repository at this point in the history
Restrict exclude coach for to assigned coaches only.
  • Loading branch information
rtibbles authored May 23, 2022
2 parents d235acc + 67b58c3 commit 9728419
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions kolibri/core/auth/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ def filter_exclude_member_of(self, queryset, name, value):
def filter_exclude_coach_for(self, queryset, name, value):
return queryset.exclude(
Q(roles__in=Role.objects.filter(kind=role_kinds.COACH, collection=value))
| Q(
roles__in=Role.objects.filter(
kind=role_kinds.COACH, collection_id=value.parent_id
)
)
)

def filter_exclude_user_type(self, queryset, name, value):
Expand Down

0 comments on commit 9728419

Please sign in to comment.