[GeoNode-users] How to change button view permissions ?
samuel potter
samuelpotter12 at yahoo.fr
Tue Aug 6 22:07:10 PDT 2019
Hi,
I'm working as an intern for a company. My work is to upgrade the GeoNode version and change things on it. I would like to know if some of you could explain me how to change the permissions button in a layer for example ?If I upload a new map, and I don't give the right for the user to download it, I want to hide the button. So for this I thought I could do something like :
{% if resource.storeType != "remoteStore" %} {% get_obj_perms request.user for resource.layer as "Layer_perms" %} <li class="list-group-item"> {% if links or links_download %} <button class="btn btn-primary btn-md btn-block" data-toggle="modal" data-target="#download-layer">{% trans "Download Layer" %}</button> {% else %} {% if request.user.is_authenticated %} <button class="btn btn-primary btn-md btn-block" id="request-download">{% trans "Request Download" %}</button> {% endif %} </li>
but after doing that, the "Download layer" was still there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20190807/3959a9e2/attachment.html>
More information about the geonode-users
mailing list