#42 Fined tuned list of eligible to see places
This commit is contained in:
parent
84b01f3a9a
commit
e11151858b
@ -83,7 +83,9 @@ class Explorer(models.Model):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def get_places_eligible_to_see(self):
|
def get_places_eligible_to_see(self):
|
||||||
return Place.objects.all().filter(level__lte=self.level)
|
if self.user.is_superuser:
|
||||||
|
return Place.objects.all()
|
||||||
|
return Place.objects.all().filter(level__lte=self.level) | self.places.all()
|
||||||
|
|
||||||
def is_eligible_to_see(self, place):
|
def is_eligible_to_see(self, place):
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user