diff --git a/leaflet_storage/managers.py b/leaflet_storage/managers.py index 6f8586d..77216f2 100644 --- a/leaflet_storage/managers.py +++ b/leaflet_storage/managers.py @@ -5,4 +5,8 @@ class MapManager(models.GeoManager): def visible(self, request): filter = Q(share_status=self.model.PUBLIC) + if request.user.is_authenticated(): + filter = filter | Q(owner=request.user) + filter = filter | Q(editors=request.user) + return self.filter(filter)