Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
do not leak admin urls
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterW-LWL committed Apr 29, 2019
1 parent 9e1b1dd commit 867205f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aldryn_locations/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ def render(self, context, instance, placeholder):
data = '{}{}'.format(base_url, data)
path_sources.append(data)
else:
if not request.toolbar or not (
getattr(request.toolbar, 'edit_mode')
or getattr(request.toolbar, 'edit_mode_active')
):
# do not leak /admin urls
data['admin'] = None
location_data.append(data)

# Options for the map comes from plugin so I assigned it here
Expand Down

0 comments on commit 867205f

Please sign in to comment.