AuthorizationPolicy
Authorization policy (app/authorization_policies): a Liquid check that restricts
access to the pages it is attached to. When several policies are attached, all must pass
type AuthorizationPolicy implements AdminSharedAttributesInterface {
authorization_policy_associations: [AuthorizationPolicyAssociation!]
content: String!
created_at: JSONDate!
flash_alert: String
http_status: Int
id: ID!
manually_managed: Boolean
metadata: HashObject
name: String!
physical_file_path: String
redirect_to: String
updated_at: JSONDate!
}
Fields
authorization_policy_associations (AuthorizationPolicyAssociation)
Pages this policy is attached to
content (String)
Liquid evaluated on every request to a protected page. Access is granted only
when it renders true (surrounding whitespace and letter case are ignored); any
other output, or an error, denies it
created_at (JSONDate)
Timestamp of when the object was created, set automatically by the system
flash_alert (String)
Liquid that evaluates to the message shown to the user when access is denied, available as context.flash.alert
http_status (Int)
HTTP status returned when access is denied and redirect_to is blank: 403 or 404. The page with slug 403 or 404 is rendered when it exists. When blank, 403 is returned
id (ID)
Unique identifier of the object
manually_managed (Boolean)
When true, the resource is managed outside of files: pos-cli deploy and sync never overwrite or delete it
metadata (HashObject)
Free-form data attached to the resource with the metadata key of its file (or the metadata argument of an admin mutation)
name (String)
Name of the policy, used to attach it to pages
physical_file_path (String)
Path of the file the resource comes from, relative to the app directory, for
example views/pages/index.liquid or
modules/my_module/public/views/partials/header.liquid. Identifies the resource
in deploy, sync and admin mutations
redirect_to (String)
Liquid that evaluates to the path or URL the user is redirected to when access
is denied. When blank, the error page for http_status is rendered instead
updated_at (JSONDate)
Timestamp of when the object was last updated, set automatically by the system
Interfaces
AdminSharedAttributesInterface
Attributes shared by resources that can be deployed from files with pos-cli
(pages, partials, layouts, notifications, authorization policies, schemas, assets etc.)