subZero
subZero

Reputation: 5176

How to limit Objects on a role basis with Parse.com?

Take this example. I have three classes:

Role
User
Notes

I have this user:

id: G3CRqk1vif
username: john

And I have this role:

id: cKxExXWXFS
name: cia

Now, I create a super secret note object:

note: Obama is alive!
acl: {"cKxExXWXFS":{"read":true,"write":true}}

As you probably already have spotted, the note is saved with the acl of the CIA role. However, if I add user "john" as a relation to the "cia" role, he still can not read the note. How should I approach this problem?

Upvotes: 0

Views: 134

Answers (1)

Jonathan Cutrell
Jonathan Cutrell

Reputation: 516

The Parse docs say to use this as the ACL instead.

{"role:cia" : {"read":true,"write":true}}

Upvotes: 1

Related Questions