Permission with find vs findById

On a table I have the ACL set so that AuthenticatedUser cannot find and Owner can. I am trying to load an object with relations from this table as the owner. When I use the Backendless.Data.of(Table.class).findById method I get a 1013 error saying that the “user has no permission to find elements in persistence storage”, however if I use regular find method with a whereClause objectId = ‘xxxx’, the query succeeds. Is this expected behavior?

Hi Bob,

This is expected behaviour. You just should not get restricted objects in your collection.

Regards,

Denys

I guess I should have specified I am retrieving the same object. Only when I find it with a plain find query it returns the object when I try to do a findbyid on the same object the permissions are denied.

Do you have have restrictions for authenticated and android user for find&

No the only permission I have denied is authenticated user to find the object. I made sure owner is set to allow. I am sure the users objectId is attached to the query because in my code if I swap findById to find and make no other changes surrounding that code it returns the object. This doesn’t really impact my project I was just curious if it was expected behavior.