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

Commit

Permalink
Do not allow_edit by default
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface committed Aug 13, 2014
1 parent d2b068f commit 9f16bec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions leaflet_storage/views.py
Expand Up @@ -176,12 +176,12 @@ def get_tilelayers(self):
return TileLayer.get_list(selected=self.object.get_tilelayer())

def is_edit_allowed(self):
if self.request.user.is_authenticated():
if self.object.edit_status == self.object.ANONYMOUS:
allow_edit = True
elif self.request.user.is_authenticated():
allow_edit = self.object.can_edit(self.request.user, self.request)
else:
# Default to True: display buttons for anonymous, they can
# login from action process
allow_edit = True
allow_edit = False
return allow_edit

def get_storage_id(self):
Expand Down

0 comments on commit 9f16bec

Please sign in to comment.