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

Check permissions for /rest/documents #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

megies
Copy link
Collaborator

@megies megies commented Sep 6, 2017

They are correctly checked for /rest/document_indices but should of course also be checked for /rest/documents.

@megies megies added the bug label Apr 28, 2016
@megies megies added this to the Open-Source milestone Jul 6, 2016
@megies
Copy link
Collaborator

megies commented Sep 5, 2017

This is really a show-stopper for permission-based user accounts, as it makes the whole authentication quite useless right now because even if you don't see the items in the WebGIS, everybody can still get every document via /rest/documents interface.

does not cover the case of multiple indices for a single document yet,
and also misses tests so far (but confirmed to work locally, for the
case of one index entry per quakeml document)
@megies
Copy link
Collaborator

megies commented Sep 6, 2017

Here's a first shot at this issue. So far most likely does not properly cover the case of multiple index entries for a single document..

Also no tests so far..

pass
queryset = queryset.model.objects.get_filtered_queryset(
document_type="quakeml",
queryset=queryset, public=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might have to be changed now with 533339b

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.

1 participant