From eacec73033ec5d572c95fa055193177233ec1f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 9 Jan 2016 23:15:56 +0100 Subject: [PATCH] MapManager.visible(): also include maps where current user is owner or editor --- leaflet_storage/managers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/leaflet_storage/managers.py b/leaflet_storage/managers.py index 6f8586d..122e232 100644 --- a/leaflet_storage/managers.py +++ b/leaflet_storage/managers.py @@ -4,5 +4,7 @@ class MapManager(models.GeoManager): def visible(self, request): filter = Q(share_status=self.model.PUBLIC) + filter = filter | Q(owner=request.user) + filter = filter | Q(editors=request.user) return self.filter(filter)