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

Non-public datasets accessed using a token do honor default settings #3261

Merged
merged 3 commits into from
Sep 24, 2018

Conversation

rschwanhold
Copy link
Contributor

@rschwanhold rschwanhold commented Sep 21, 2018

In this scenario the user is not logged in but using a sharing token (for those routes that allow sharing tokens as a parameter. GET /api/dataSetConfigurations/:dataSetName does not have the option to add a sharing token). Because of that userDataSetConfigurationDAO.findOneForUserAndDataset obviously will not find anything. The problem was that .orElse(dataSetDAO.findOneByName(dataSetName).flatMap(_.defaultConfiguration)) also failed because of missing permission

Steps to test:

  • Configure a default position for a non-public dataset
  • Copy the Sharing Link for that dataset (should include a token, because the dataset is not public)
  • Log out and access the dataset using the copied link
  • You should be at the configured default position

Issues:


@rschwanhold rschwanhold changed the title added GlobalAccessContext Non-public datasets accessed using a token do honor default settings Sep 21, 2018
@rschwanhold rschwanhold self-assigned this Sep 21, 2018
@rschwanhold
Copy link
Contributor Author

@jstriebel do you think it is ok to add the globalAccessContext at this point? This means that everyone could see the default configuration of this dataset. The alternative would be to add the sharingToken to this route.

@rschwanhold rschwanhold merged commit 7dd7d91 into master Sep 24, 2018
@normanrz normanrz deleted the default-setting-for-non-public-datasets branch February 20, 2019 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-public datasets accessed using a token do not honor default settings
2 participants