There are three default security roles in CloudKit:
- World
- Authenticated
- Creator
And three permissions:
- Create
- Read
- Write
How do these security roles and permissions work?
Here are examples of some of the questions I would hope get answered by an explanation of security roles:
- What do the three roles mean? The first two seem obvious, but the last one seems less so. E.g. does Creator refer to the creator of the table, or the creator of a record?
- Where would the deletion permission fall under? Write?
- Can security roles be applied to individual records? (E.g. I want a user to have access to only a subset of the records in the InstantMessages table: the ones they send, and the ones they receive. Can something of this nature be done via security roles?)
- Are permissions inherited? (E.g. Does the creator get all permissions granted from creator, authenticated, and world?)
- Are permissions purely additive? Or can I create a custom role that will remove privileges rather than add them? (E.g. in order to create a "Banned User" security role.)
- How do I set the role on a user? Can I set a default role for every user that is created? Can I change a user's role programmatically?
- How do I create new security roles? Can I create/update them programmatically?