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

fix (values responder): Hide value IRIs that the user doesn't have permission to see. #25

Merged
merged 1 commit into from Feb 5, 2016

Conversation

benjamingeer
Copy link

Fixes issue #19.

… the user doesn't have permission to see (issue 19).
@benjamingeer benjamingeer added the bug something isn't working label Feb 3, 2016
@benjamingeer benjamingeer added this to the On Deck milestone Feb 3, 2016
benjamingeer pushed a commit that referenced this pull request Feb 5, 2016
…missions

fix (values responder): Hide value IRIs that the user doesn't have permission to see.
@benjamingeer benjamingeer merged commit 5485c8c into develop Feb 5, 2016
@benjamingeer benjamingeer deleted the wip/value-version-history-permissions branch February 5, 2016 09:26
@tobiasschweizer
Copy link
Contributor

Ok, If I understand correctly, the scenario in the test (versionHistoryWithHiddenVersion) is this:

  • we look at the title of a book (http://data.knora.org/21abac2162/values/f76660458201)
  • this title has a previous value version which is not visible to the user (with Iri 22222222) with the value "previous 1"
  • this value (222222) has a previous value version which is visible to the user (with Iri 11111111) with the value "previous 2"

The user will see the value with the current title and the previous version (11111111) "previous 2", but not "previous 1" with the Iri 22222222.

To make this consistent, you set the "previous value" pointer of the current title to None rather than mentioning an Iri the user is not allowed to dereference. However, the user knows that he cannot see a version because otherwise there would never be a None in previousValue but in the first value.

So you actually check if (1) there is a previous value (nonEmtpy) and (2) it is visible.

I agree.

@benjamingeer benjamingeer mentioned this pull request Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants