#NEWLINE# def filter_queryset( self , qs , user ) : #NEWLINE# #INDENT# if user . has_perm ( ( '%s.can_manage' % qs . model . _meta . app_label ) , qs . model ) : #NEWLINE# #INDENT# return qs #NEWLINE# #UNINDENT# return qs . filter ( ( Q ( employees = ( user . djangobmf . employee or ( - 1 ) ) ) | Q ( team__in = self . djangobmf . teams ) ) )