Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the exclusive keyword #45

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add the exclusive keyword #45

wants to merge 5 commits into from

Conversation

mattiagiupponi
Copy link
Contributor

ref #44

@mattiagiupponi mattiagiupponi self-assigned this Nov 19, 2024
@mattiagiupponi mattiagiupponi linked an issue Nov 19, 2024 that may be closed by this pull request
@gannebamm
Copy link

Thanks for the fast work @mattiagiupponi !
We have deployed the changes and it is starting properly. @vineetasharma105 is currently reviewing its functionality.

@vineetasharma105
Copy link

The keyword - 'Subsite_exclusive' is working for documents, maps, datasets!!

@mattiagiupponi
Copy link
Contributor Author

The keyword - 'Subsite_exclusive' is working for documents, maps, datasets!!

great!

Thanks for the fast work @mattiagiupponi ! We have deployed the changes and it is starting properly. @vineetasharma105 is currently reviewing its functionality.

@gannebamm please let me know when your tests are done so I can merge the PR

@vineetasharma105
Copy link

Hi,
I am facing a question when dealing with subsite exclusive contents.
Question : Why the subsite exclusive contents , redirected via the linked resources click, still points towards and redirects to the homepage of geonode and the user is not anymore on the subsite page?
Enhancement/Requirement : as a user and as an admin also, the linked resources should not redirect to the homepage and rather stay on the subsite page, as the contents are 'subsite specific'.

As can be seen in the screen shot, the map (subsite_exclusive_test_map) and its related data set (subsite_exclusive_test_data)
image are part of Holisoils subsite and the keyword and the group is set up accordingly. Still , the linked resources links points to the homepage.
Map : https://geonode-demo.thuenen.de/holisoils/catalogue/uuid/20e4d7c5-09fd-46ab-843b-f1bbb4bfee8d
dataset : https://geonode-demo.thuenen.de/catalogue/uuid/ac3361f8-8299-43de-a4f7-20d51a6c7c01
Subsitelink: https://geonode-demo.thuenen.de/holisoils/#/

@mattiagiupponi
Copy link
Contributor Author

Hi @gannebamm @vineetasharma105
With the new push the resources in the linked resource are now pointing to the subsite instead of the main catalogue page.
NOTE: it might be redundant to say, but the resource in the map MUST be part of the subsite in order to be saw via the linked_resource link

@gannebamm
Copy link

I just deployed the changes and they do not work as intended, yet.

See: https://geonode-demo.thuenen.de/holisoils/catalogue/uuid/6e60d107-3643-4ce5-9482-e098ad4e9305

The map is subsite exlusive, belongs to the holisoils group and uses only subsite ressources. It seems all ressources which are subsite_exclusive currently fail with: [ "Subsite not found" ] for a request like https://geonode-demo.thuenen.de/de-de/api/v2/datasets/22?api_preset=viewer_common&api_preset=dataset_viewer

We used these subsite specific variables:

# SUBSITE SPECIFIC CONFIGURATION
ENABLE_SUBSITE_CUSTOM_THEMES = True
ENABLE_CATALOG_HOME_REDIRECTS_TO = False
SUBSITE_READ_ONLY = False # return download_resourcebase and view resourcebase as permissions
SUBSITE_HIDE_EXCLUSIVE_FROM_SPECIFIC_API = True # If TRUE will hide the `subsite_exclusive` resources also from the detailed endpoint `/documents`, `/maps`, `/datasets`, '/geoapps`

The code is using 270c349

Did we misconfigure something?

@mattiagiupponi
Copy link
Contributor Author

Can you try by set SUBSITE_HIDE_EXCLUSIVE_FROM_SPECIFIC_API = False ?

@gannebamm
Copy link

gannebamm commented Nov 25, 2024

redeployed.

Can you try by set SUBSITE_HIDE_EXCLUSIVE_FROM_SPECIFIC_API = False ?

This will fix the [ "Subsite not found" ] issue but the links still point to the main portal.

https://geonode-demo.thuenen.de/holisoils/catalogue/#/maps?d=57%3Bmap

@mattiagiupponi
Copy link
Contributor Author

uhm is working fine on my test environment with or without that variable, i'll give another check soon

@gannebamm
Copy link

Just as additional info:
We use this deployment https://github.com/Thuenen-GeoNode-Development/thuenen_atlas/tree/subsite_exclusive_test
Which is based on the docker blueprint plus some of our contrib apps. It will use the subsite dev branch as listed here: Thuenen-GeoNode-Development/thuenen_atlas@4183280

@mattiagiupponi
Copy link
Contributor Author

mattiagiupponi commented Nov 27, 2024

Hi @gannebamm
I made some local test using the project you linked and as you mentioned, the linked resources still point the main catalogue:
image

But the API v2 is returning the linked resources as expected by adding the subsite:

image

While on my local instance using geonode-master and mapstore-client-master is working as expected:

image

I notice that the mapstore-client used by the project, is a fork of the 52north mapstore client fork which is about 20 commits behind the production one for GeoNode 4.3.x which also includes improvement for the linked resources (GeoNode/geonode-mapstore-client@c7f6d10)

Can you please evaluate to upgrade the mapstore client and align it to the GeoNode one? So we can have the same environment.

@mattiagiupponi
Copy link
Contributor Author

As counterproof, i run a geonode 433 on my local instance and the subsite is correctly used for the linked resources:
image

@gannebamm
Copy link

@mattiagiupponi Thank you very much for the in-depth look! Yes, we will upgrade soon. See: Thuenen-GeoNode-Development/thuenen_atlas#58 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclusive keyword
3 participants