GeoNode / geonode-project

A django template project for creating custom GeoNode projects.
http://geonode.org
77 stars 171 forks source link

How to set permission to dataset using code in geonode-project? #400

Open eruiz67 opened 1 year ago

eruiz67 commented 1 year ago

I have created a django-app for my geonode proyect. In that app I have created a dataset using code dataset_instance = resource_manager.ingest(files, resource_type=Dataset, defaults={'owner': owner, 'title': title}) What i need to do is to add permissions to tha dataset Using code. Only the owner and the "INETER" group will be able to see the dataset. The rest of user will not be able to set de dataset. The INETER group will also have "manage" privileges. How can I do it using code. Something like this Captura desde 2023-01-16 12-22-58