-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Email field is no longer present in PFUsers returned from query #4028
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
Comments
Is my case not different, in that the admin user trying to read this other user has the Admin role, which has read access? Does this not mean that the read access granted to the Admin role is not truly read access? This feels entirely wrong to me. (And note, this code worked identically on parse.com) |
I suppose this just gets ignored now, as I can't reopen the issue. To repeat, I have specifically given an Admin role read access to all user data. This is a very valid use case. And those user objects are not just those from a PFQuery, but users found linked by other objects in my admin application. I'd love to help fix this, but I am an iOS developer, and I think it is beyond me without some help. |
So I guess I and others like me are stuck on old versions of Parse server. Which may cause you more issues in the long run. |
Also, @acinader seemed perfectly fine with a change to remove the default:
|
It won't be ignored, @zingano. And no, you are not stuck with an old version. You can write a cloud function that queries @acinader and @flovilmart might answer better. And if he said he is ok with accepting a change, you are more than welcome to provide a PR. |
Thanks, but like I said, I'm an iOS (and OS X) developer, not a server engineer. So I guess I'll have to stick to the release before this was introduced if no-one else sees the fact that a role explicitly given a access in each user's ACL is NOT ALLOWED TO READ. |
Are you able to write cloud functions in JS? That should be enough to solve your problem, as long as you can update the iOS app. |
@zingano I can create PR for this case (remove default = ['email']) and let see if it get accepted or not. |
@zingano on second thought, I think it's better to keep it this way. In your case, the work around would be you have a cloud code function where inside you check the role of that user, if that user is Admin, then do query with masterKey and throw the results back to client. The best way in the near future for parse-server to support this would be that we have column level permission where you can set the role to the column just like CLP or ACL. |
The solution to this, is to implement the agreed changes in #3588 |
We use GitHub Issues for bugs.
If you have a non-bug question, ask on Stack Overflow or Server Fault:
You may also search through existing issues before opening a new one: https://github.com/ParsePlatform/Parse-Server/issues?utf8=%E2%9C%93&q=is%3Aissue
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---
Issue Description
My system has an OS X admin app which is available to trusted administrators only and these admins' PFUser objects are members of a privileged "Admin" Role. The administrators need access to the ordinary iPhone users' emails to contact them about their submissions, among other things.
Each iPhone PFUser in the database is readable by itself and by the Admin role.
For the simplest example, my admin app (Mac OS X) shows a table of users of my iPhone app.
In Parse server 2.2.24, the email column is completed with valid user emails.
In Parse server 2.4.0, this column is blank. The PFUser object that is fetched has no email property.
There were no changes in my OS X application.
Steps to reproduce
Query on the PFUser table returning e.g. newest 100 users.
Expected Results
User email property present
Actual Outcome
User email property not present (null)
Environment Setup
Server
Database
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
The text was updated successfully, but these errors were encountered: