AuthorizationPolicyInputType
Attributes of an authorization policy, the same ones that can be set in an authorization_policies/*.liquid file
type AuthorizationPolicyInputType {
content: String!
flash_alert: String
manually_managed: Boolean
metadata: HashObject
name: String
physical_file_path: String
redirect_to: String
}
Fields
content (String)
Liquid code evaluated on each request to a page using the policy; access is
granted only when it renders to true (case and surrounding whitespace are ignored)
flash_alert (String)
Liquid code rendered into the flash alert message shown when access is denied
manually_managed (Boolean)
When true, pos-cli deploy and sync never overwrite or delete it and pos-cli
pull skips it. When omitted, defaults to the track_manually_managed setting of
the instance (false unless enabled in app/config.yml)
metadata (HashObject)
Arbitrary JSON data stored with the policy (the metadata section of the file)
name (String)
Deprecated, the name is derived from physical_file_path. Name used to attach the policy to pages
physical_file_path (String)
Path of the file the policy is stored as, used by pos-cli pull and deploy.
Must be authorization_policies/<name>.liquid, optionally prefixed with
modules/<module_name>/public/ or modules/<module_name>/private/, for
example authorization_policies/is_admin.liquid
redirect_to (String)
Liquid code rendering to the URL the user is redirected to when access is
denied. A return_to parameter with the requested path is appended unless
disabled in the instance configuration. When not set, the request is answered
with an error status instead (403 by default)