NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
41 stars 27 forks source link

if a portal is private, display a "this portal is private" message #1358

Open jeanetteclark opened 4 years ago

jeanetteclark commented 4 years ago

Currently, if a portal is set to private and a user is not logged in, the message reads:

The data portal "toolik" doesn't exist.

It would be nice if it said something more like what private datasets say:

This is a private portal. If you believe you have permission to access this portal, then sign in.

laurenwalker commented 4 years ago

Thinking about this, I'm not sure there is a way we can do this without implementing a server-side portal label service (which could be helpful for other reasons). This is because portals are found by MetacatUI by searching Solr for the portal label. If the portal is private, Solr will not return that result at all. The only way to know an object is private is to retrieve it's system metadata via it's id.

For now, I'll update the message to indicate that the portal may be private, and show a sign-in button for logged out users.