[GeoNode-users] LOCKDOWN_GEONODE with AUTH_EXEMPT_URLS: Can't view content

Jonathan Doig j.doig at unsw.edu.au
Wed Feb 8 15:33:51 PST 2017


Hi all

I want unauthenticated users to be able to access public layers, maps and documents, but not people and groups.

TRY 1:
Following the doco<http://docs.geonode.org/en/master/reference/developers/settings.html#security-settings> I added this to local_settings.py:

LOCKDOWN_GEONODE = True
AUTH_EXEMPT_URLS = ('/$', '/maps', '/layers', '/documents',)

I get a login prompt for People and Groups, but no login prompt on home, layers, maps or documents.

However I still can't actually see any layers, maps or documents: it looks as if the cupboards are bare.

TRY 2:
For now I've followed this post<https://lists.osgeo.org/pipermail/geonode-devel/2015-May/000074.html> and hacked the profile_list.html and group_list.html templates to wrap the people and group list items in an authentication check:
        {% if user.is_authenticated %}
        {% include "people/_profile_list_item.html" %}
        {% else %}
          <p>Please sign in to explore People.</p>
        {% endif %}

Is there a better way? Where in the code does geonode use LOCKDOWN_GEONODE to hide content (not just URLs)?

Jonathan Doig
Software Engineer - Spatial Systems
City Futures Research Centre
UNSW Built Environment
Level 3, Red Centre West Wing

UNSW Sydney
NSW 2052 AUSTRALIA
T:+ 61 (2) 9385 5319 M: 0409 049185
cityfutures.net.au<http://cityfutures.be.unsw.edu.au/>

CRICOS Provider Code 00098G

[01_PARTER LOGOS]

Follow us:

[facebookesig]<http://www.facebook.com/UNSWBE>[twitteresig]<http://twitter.com/UNSWBuiltEnv>[cid:image013.png at 01D1D83D.50C334B0]<http://instagram.com/unswbe>[Web-Google-plus-Metro-icon-esog]<http://plus.google.com/103377744913804443069>[linkedinesig]<http://www.linkedin.com/groups/UNSW-Built-Environment-6616950>[flickresig]<http://www.flickr.com/photos/unswbuiltenvironment/>[youtubeesig]<https://www.youtube.com/unswbuiltenvironment>

This email and any attachment(s) transmitted with it are intended solely for the use of the addressee(s) and may contain information that is confidential or subject to legal privilege. If you receive this email in error, please disregard the contents of the email and attachment(s), delete them and notify the sender immediately. Please note that any copying, distribution or use of this email is prohibited. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the view of The University of New South Wales. Before opening any attachments, please check for viruses. UNSW ABN 57 195 873 179.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 47972 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 770 bytes
Desc: image004.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 752 bytes
Desc: image006.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0007.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 1425 bytes
Desc: image008.png
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.jpg
Type: image/jpeg
Size: 838 bytes
Desc: image010.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0008.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image012.jpg
Type: image/jpeg
Size: 823 bytes
Desc: image012.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0009.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image014.jpg
Type: image/jpeg
Size: 857 bytes
Desc: image014.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0010.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image016.jpg
Type: image/jpeg
Size: 836 bytes
Desc: image016.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170208/23d86119/attachment-0011.jpg>


More information about the geonode-users mailing list