Makes TeamMemberCondition work
This commit is contained in:
parent
1128e43150
commit
0f488e7a12
1 changed files with 6 additions and 4 deletions
|
@ -330,8 +330,10 @@ class SpeakerConditionController(IsMetByFilter, ConditionController):
|
||||||
class GroupMemberConditionController(IsMetByFilter, ConditionController):
|
class GroupMemberConditionController(IsMetByFilter, ConditionController):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def pre_filter(self, queryset, user):
|
def pre_filter(self, conditions, user):
|
||||||
''' Returns all of the items from queryset which are enabled by a user
|
''' Returns all of the items from conditions which are enabled by a
|
||||||
being member of a Django Auth Group. '''
|
user being member of a Django Auth Group. '''
|
||||||
|
|
||||||
return queryset
|
return conditions.filter(
|
||||||
|
group=user.groups.all(),
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue