[GeoNode-users] Problem to remove download and view permissions for anonymous in all layers

Simone Dalmasso simone.dalmasso at gmail.com
Thu Jun 22 06:22:58 PDT 2017


I Davi,
why not use the shopping cart in layer list to change permissions to all
the selected? Are there too many layers?
Alternatively you can edit settings and make sure default permissions are
false
https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L492 and
then run in the shell:

>>> from geonode.base.models import ResourceBase
>>> for resource in ResourceBase.objects.all():
resource.set_default_permissions()

hope this helps

2017-06-22 15:13 GMT+02:00 Davi Custodio <davicustodio at gmail.com>:

> Hello guys. I'm using Geonode 2.4. I would like to remove the right to
> download and view layers for anonymous users on all layers. For this, by
> investigating the database tables, I executed the following script:
>
> delete from guardian_userobjectpermission where user_id = -1 and
> permission_id = 117 or permission_id = 115
>
> Where user_id = -1 refers to anonymous users, and the 115 and 117
> permission to view and downloads.
>
> I was hoping to get all of the download and preview checks for any
> anonymous person.
>
> That's not what happened. Although there are no records in
> guardian_userobjectpermission, the checkboxes remain checked and the
> accesses remain open.
>
> Could someone tell me another strategy to solve the problem?
>
> Thank you.
>
> --
> Davi de O. Custódio
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170622/2abe718a/attachment.html>


More information about the geonode-users mailing list