Skip to content

Basic CRUD Policy

Allow a user to read and create posts.

Policy

json
{
  "version": "2024-01-01",
  "statement": [
    {
      "sid": "ReadAndCreatePosts",
      "effect": "Allow",
      "action": ["collections:read", "collections:create"],
      "resource": ["posts"]
    }
  ]
}

What This Grants

ActionResourceResult
collections:listpostsAllowed (read matches list and view)
collections:viewpostsAllowed
collections:createpostsAllowed
collections:updatepostsDenied (implicit)
collections:deletepostsDenied (implicit)
collections:readcommentsDenied (resource doesn't match)

Setup

  1. Register posts as a managed collection
  2. Create the policy above in iam_policies
  3. Attach the policy to a user via iam_user_policies