Reputation: 338
I used parse in front end with javascript and had cloud functions too. In frontend parse query takes long time to get the records so I decided to make a cloud function. All parse classes (table) are using the ACL, so when I logged in in frontend and get the data from table A its return all records related the logged in user without adding any equal query with user because i implemented the ACL permission and its return matched logged in user result.
const query = new Parse.Query("Crew");
var crewData = await query.find();
Now the problem is when I implement the same query in cloud function it not return the matched user data. I added the match with logged in user on ACL
Parse.Cloud.define("totalCrew", async (request) => {
var currentUser = request.user;
const query = new Parse.Query("Crew");
const acl = new Parse.ACL(currentUser);
query.equalTo("ACL", acl);
const results = await query.find();
return results;
});
By using above query I am getting error - parseError: 102 Cannot query on ACL.
Please help me how to get records using ACL match on the current user, Thanks
Upvotes: 2
Views: 69