GeoNode / geonode-project

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

How to make dataset only visible for its owner and certain group? #399

Open eruiz67 opened 1 year ago

eruiz67 commented 1 year ago

How can a I create a new group called "INETER" and asign to some user? Also I want to make dataset only visible to its owner and the INETER group. A normal user can only see the dataset he/she created The users part of the INETER group can see all datasets. How can I achieve that?

gannebamm commented 1 year ago

Hi @eruiz67, please consult the official documentation: creating groups: https://docs.geonode.org/en/master/admin/admin_panel/index.html#creating-a-group permissions generally: https://docs.geonode.org/en/master/basic/permissions/index.html assigning permissions: https://docs.geonode.org/en/master/usage/managing_documents/document_permissions.html

You can create a group and assign users to that group. In the share options, you can share a dataset with all group members, while anonymous or non-group users will not be able to view it.

Hope this helps

eruiz67 commented 1 year ago

Thank you so much for your help. The links helped me to understand how to set permissions using the user interface. Now I need to set those permissions using code. In my django app I have created the dataset with

dataset_instance = resource_manager.ingest(files, resource_type=Dataset, defaults={'owner': owner, 'title': title})

I neet to set using code that only the owner can see the dataset and the users of the group "INETER" that i just created. Ineter group will have manage privileges. Something like this [image: Captura desde 2023-01-16 12-22-58.png] Captura desde 2023-01-16 12-22-58

El lun, 16 ene 2023 a las 4:45, Florian Hoedt @.***>) escribió:

Hi @eruiz67 https://github.com/eruiz67, please consult the official documentation: creating groups: https://docs.geonode.org/en/master/admin/admin_panel/index.html#creating-a-group permissions generally: https://docs.geonode.org/en/master/basic/permissions/index.html assigning permissions: https://docs.geonode.org/en/master/usage/managing_documents/document_permissions.html

You can create a group and assign users to that group. In the share options, you can share a dataset with all group members, while anonymous or non-group users will not be able to view it.

Hope this helps

— Reply to this email directly, view it on GitHub https://github.com/GeoNode/geonode-project/issues/399#issuecomment-1383765126, or unsubscribe https://github.com/notifications/unsubscribe-auth/APEMEBAUOFKH3SFSITW32EDWSUKD5ANCNFSM6AAAAAAT3REBGE . You are receiving this because you were mentioned.Message ID: @.***>