-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
matchesQuery
and pointer permissions
#2431
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
I figured this out, at least partially.
Since This is all only a problem if you're using pointer permissions on the class to which the outer query is addressed. In My solution is simply to change |
With all the babel stuff, I don't even know where to start in preparing a PR. But here's my fixed source: https://github.com/audm/parse-server/blob/master/lib/RestQuery.js#L212 |
Nice pin pointing of the issue, check the getUserAndRoleACL method in src/RestQuery.js You should be able to do the same trick. Also, can you add a test that covers that case alongside with the fix? If you're unable to patch and open the PR, then just open a PR with the failing test, I'll take care of the fix |
I actually don't have the slightest idea how to write a test for this. On Mon, Aug 1, 2016 at 7:32 PM, Florent Vilmart [email protected]
|
Yesterday I've also stumbled over this annoying bug and searched hours for mistakes in my queries, which could result in empty query results with no success until i found this issue here. |
@christianpbrink 's patch is on the generated sources, nothing much I can do here. This is where the patch should be done: @FlorianSchuler why don't you take care of the fix and the test? |
Sorry @flovilmart I think I'm not a help here, I'm an absolute newbie to this whole project. |
the best way to not be a newbie is to jump into the project. You have a case that reproduces the problem, and I pointed you to the right file/position to put the fix... |
@christianpbrink the fix is gonna land in the next release, the issue will close when the PR gets merged! Thanks for your patience. |
(released with 2.2.19) |
Issue Description
I've got a class,
PlaylistItem
, that has a pointer to aUser
. I'm using pointer permissions to give thatUser
full read and write permissions on thePlaylistItem
that points to it. The only public CLP onPlaylistItem
is 'create'.My use of pointer permissions is new. Until today I had full public 'read' CLPs on
PlaylistItem
.This is an iOS app. One of the
PFQuery
s I run againstPlaylistItem
has amatchesQuery
condition, where the inner query is on a different class calledArticleVersion
.ArticleVersion
has public 'read' CLPs.The
matchesQuery
condition always worked fine until now. It stops working when I whack the public 'read' CLP onPlaylistItem
and rely on pointer permissions only. By "stops working" I mean it causes my outer query to return no results.Steps to reproduce
I can write a clear repro if need be, but first I'd like some confirmation as to whether this is a known issue (or perhaps is even expected behavior for reasons I'm not thinking of). I searched for a good while and found nothing about it.
Logs/Trace
Thank you!
The text was updated successfully, but these errors were encountered: