-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Fixes #12616] Document upload permissions fix #12707
[Fixes #12616] Document upload permissions fix #12707
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @kilichenko-pixida on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12707 +/- ##
==========================================
- Coverage 67.02% 67.01% -0.01%
==========================================
Files 952 952
Lines 56905 56905
Branches 6723 6723
==========================================
- Hits 38139 38135 -4
- Misses 17155 17159 +4
Partials 1611 1611 |
@kilichenko-pixida we're going to review this PR. Meanwhile please include your github account at the end of the .clabot file to sign the Contributor License Agreement. |
geonode/documents/api/views.py
Outdated
@@ -137,7 +137,7 @@ def perform_create(self, serializer): | |||
|
|||
resource.set_missing_info() | |||
resourcebase_post_save(resource.get_real_instance()) | |||
resource_manager.set_permissions(None, instance=resource, permissions=None, created=True) | |||
resource.set_default_permissions(owner=self.request.user) |
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.
in this case we should keep created=True
since we are in the creating workflow
451b4d6
to
0c60488
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @kilichenko-pixida on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
0c60488
to
6a79f69
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @kilichenko-pixida on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
6a79f69
to
b67e59f
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @kilichenko-pixida on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
Aims to resolve #12616
It seems like the problem was that permissions were assigned to None both when handling UI and API document upload. On UI it didn't cause a problem because in UI upload there is also a call setting permissions to defaults again. Here I am removing the unnecceary assigment of permissions to None in UI code and setting permissiosn to defaults in API code.