-
Notifications
You must be signed in to change notification settings - Fork 27
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
Read only submission report content #5100
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5100 +/- ##
=======================================
Coverage 96.74% 96.74%
=======================================
Files 771 771
Lines 26636 26638 +2
Branches 3467 3467
=======================================
+ Hits 25770 25772 +2
Misses 605 605
Partials 261 261 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally I'd configure the PrivateMediaMixin
so that the files are not downloaded with inline
directives in the Content-Disposition
header. I think you should be able to get there with:
- https://django-privates.readthedocs.io/en/latest/reference.html#privates.admin.PrivateMediaMixin.get_private_media_view_options to pass
django-sendfile2
options to the underlying view. Should be achievable with theprivate_media_view_options
attribute on the admin class. - passing
attachment=True
to https://django-sendfile2.readthedocs.io/en/latest/django_sendfile.utils.html#django_sendfile.utils.sendfile
The sendfile
options are consumed here: https://github.com/sergei-maertens/django-privates/blob/27c7391ef82479f5d99fb6542647ab999b3ebd2a/privates/views.py#L38
fields = ( | ||
"title", | ||
"content", | ||
"submission", | ||
"last_accessed", | ||
"task_id", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you specify these explicitly? by default all model fields are used iirc. I'd expect this not to be necessary.
Closes open-formulieren/security-issues#34
Changes
The submission report content is now read-only in the admin
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Dockerfile/scripts
./bin
folderCommit hygiene