master #463
@ -17,10 +17,11 @@ class ShareUserAutocomplete(Select2QuerySetView):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
qs = User.objects.none()
|
||||||
if self.request.user.is_anonymous:
|
if self.request.user.is_anonymous:
|
||||||
return User.objects.none()
|
return qs
|
||||||
qs = User.objects.all()
|
|
||||||
if self.q:
|
if self.q:
|
||||||
|
qs = User.objects.all()
|
||||||
# Due to privacy concerns only a full username match will return the proper user entry
|
# Due to privacy concerns only a full username match will return the proper user entry
|
||||||
qs = qs.filter(
|
qs = qs.filter(
|
||||||
Q(username=self.q) |
|
Q(username=self.q) |
|
||||||
@ -41,13 +42,13 @@ class ShareTeamAutocomplete(Select2QuerySetView):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
qs = Team.objects.none()
|
||||||
if self.request.user.is_anonymous:
|
if self.request.user.is_anonymous:
|
||||||
return Team.objects.none()
|
return qs
|
||||||
qs = Team.objects.filter(
|
|
||||||
deleted__isnull=True
|
|
||||||
)
|
|
||||||
if self.q:
|
if self.q:
|
||||||
# Due to privacy concerns only a full username match will return the proper user entry
|
qs = Team.objects.filter(
|
||||||
|
deleted__isnull=True
|
||||||
|
)
|
||||||
q_parts = self.q.split(" ")
|
q_parts = self.q.split(" ")
|
||||||
q = Q()
|
q = Q()
|
||||||
for part in q_parts:
|
for part in q_parts:
|
||||||
|
Loading…
Reference in New Issue
Block a user