#42 Restricting Acces to Place requests
This commit is contained in:
@@ -85,6 +85,9 @@ class Explorer(models.Model):
|
||||
def get_places_eligible_to_see(self):
|
||||
return Place.objects.all().filter(level__lte=self.level)
|
||||
|
||||
def is_eligible_to_see(self, place):
|
||||
return place in self.get_places_eligible_to_see()
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
|
||||
|
Reference in New Issue
Block a user