---
source: cedar-policy-formatter/src/pprint/fmt.rs
expression: formatted
input_file: cedar-policy-formatter/tests/index.cedar
---
permit (principal, action, resource)
when { principal["is_admin"] };

permit (principal, action, resource)
when { principal["roles"]["admin"] };

permit (principal, action, resource)
when
{
  principal // principal
  ["roles"] // get roles
    ["admin"] // get the admin role
};
