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

475 added acceptable content types #498

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

Conversation

adp-atea
Copy link
Contributor

No description provided.

@adp-atea adp-atea linked an issue Jul 31, 2023 that may be closed by this pull request
spinta/commands/write.py Outdated Show resolved Hide resolved
spinta/commands/write.py Outdated Show resolved Hide resolved
spinta/commands/write.py Outdated Show resolved Hide resolved
spinta/datasets/backends/helpers.py Outdated Show resolved Hide resolved
from spinta.commands.write import write
store = prepare_manifest(context)
manifest = store.manifest
root = manifest.objects['ns']['']
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if access rights are checked here? We should limit client to only write to a specified namespace or model. And here, we just take root namespace, which probably gives permission to write data to any namespace?

spinta/formats/helpers.py Outdated Show resolved Hide resolved
tests/commands/test_direct_data_upload.py Outdated Show resolved Hide resolved
tests/commands/test_direct_data_upload.py Outdated Show resolved Hide resolved
tests/commands/test_direct_data_upload.py Outdated Show resolved Hide resolved
tests/commands/test_direct_data_upload.py Outdated Show resolved Hide resolved
# Conflicts:
#	spinta/commands/write.py
#	spinta/datasets/backends/csv/components.py
#	spinta/datasets/backends/helpers.py
#	spinta/formats/helpers.py
else:
stream = _read_request_body(
context, request, scope, action, params, stop_on_error,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will never be called.

@@ -49,6 +52,7 @@
STREAMING_CONTENT_TYPES = [
'application/x-jsonlines',
'application/x-ndjson',
'application/json'
Copy link
Collaborator

Choose a reason for hiding this comment

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

application/json should not be here, this is not a streaming content type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct data upload
2 participants