Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
MapManager.visible(): also include maps where current user is owner o…
Browse files Browse the repository at this point in the history
…r editor
  • Loading branch information
plepe committed Jan 11, 2016
1 parent 47dd0e5 commit e1ef0e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions leaflet_storage/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e1ef0e4

Please sign in to comment.