SynBioDex / SBOLExplorer

MIT License
4 stars 2 forks source link

Should be able to set the default graph URI to empty string #35

Closed cjmyers closed 4 years ago

cjmyers commented 5 years ago

The SBH admin page does not allow you to set this field to an empty string. Furthermore, setting this field, causes the query to not pickup public parts due to this code:

def send_query(query, endpoint): params = {'query': query}

if endpoint == utils.get_config()['sparql_endpoint']:
    params['default-graph-uri'] = utils.get_config()['synbiohub_public_graph']

Should also reconsider why we are setting the default-graph-uri, since the security concern of exposing private parts should be handled elsewhere now.

cjmyers commented 4 years ago

Check if we still need the option synbiohub_public_graph

cjmyers commented 4 years ago

In explorer.py, get the default_graph_uri from the arguments of the "/" endpoint request.

In search.py, if _from is empty, use the default_graph_uri instead of synbiohub_public_graph

To check that this works, perform a search logged out with synbiohub_public_graph set to empty.

yu-eric commented 4 years ago

@cjmyers See #59