-
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
via REST API uploaded documents to not get proper permissions #12616
Comments
@ahmdthr please take a look at this. Since I tested both development and stable demo it should not be linked to your latest PR #11872 edit: or better send this to @kilichenko-pixida since he has more free capacity. |
@ridoo Test REST API upload |
additional specification to reproduce: You shall use a 'normal' user to upload. Admin /superuser will work. |
Hi @gannebamm did your team had time to check this issue? otherwise i can give a check on it |
@ridoo , @kilichenko-pixida please check this. As stated a normal registered user shall be used NOT an admin user. edit: I did some clarification in the how to reproduce section above |
@gannebamm yes, I was able to reproduce it and ran into the same problem on the non-admin user after an API upload |
@gannebamm are you going to take care of this? |
@kilichenko-pixida please debug into the process and take a look at the permission granting process to identify the issue. @giohappy we will try |
The issue was indeed due to improper permissions handling. Both in The difference, however, is that in UI code, after all permissions have been removed, there is also a See PR #10 for the suggested fix. I see setting permissions to None on the API side was first introduced in 7f56ebe, though I don't know whether it was a simple oversight or there quite possibly was a good reason for it that I do not understand. On the UI side, this permission workflow was implemented as part of big changes in f760e0f from 2021. |
@kilichenko-pixida please provide a PR for master, too. @giohappy please use some of our booked time to answer the questions above to make sure the PR fits the quality critera. |
@giohappy here is the PR: #12707 , I already sent the signed license agreement to [email protected], but I guess approval is pending. Thank you. |
Expected Behavior
edit: clarifications
If I as a normal registered user upload a document via the REST API it belongs to my user and I can delete it. It should show this:
Actual Behavior
I as a normal registered user am unable to delete it. It does not show delete:
as admin I am able to delete the ressource
Steps to Reproduce the Problem
Open https://stable.demo.geonode.org/catalogue/#/documents
log in as user (not admin!)
See the delete option is missing on the new document:
Specifications
The text was updated successfully, but these errors were encountered: