Hadi
Hadi

Reputation: 124

How to restrict a class (table) read only via cloud function?

I would like to have a class in Parse database which:

-is not readable via REST API or other platforms methods. -is readable via Cloud function

This way I can be sure that only a user who has some private data inside table can read only the row which is belong to him/her. I can check required condition inside function. but its possible I do`nt know the objectId of that user yet and qualify him/her by some other data, so I can not use ACL to do this matter.

Upvotes: 0

Views: 24

Answers (1)

Davi Macêdo
Davi Macêdo

Reputation: 2984

You can disable the read access using CLP, then query via cloud code and passing the { useMasterKey: true } option.

Upvotes: 1

Related Questions