{{ permission }}

{{ permission }}

An object containing information about permission allowed or denied in the permissions system and accessed using the {{ client_permissions }} object.

Properties

Field Type Description
object_type string Will always be "permission".
is_valid true/false Will always be true.
name string The name of the permission (eg: "session", or any custom value set by the developer).
allowed true/false True if the permission is set to "allow". False if the permission is set to "deny".
expires date The date that the permission (either allowed or denied) is set to expire.
value string The value stored with the permission. May be empty.

Examples

Client Permissions allow ads

Copy
{% if client_permissions.allow_advertisements %} {% assign allowed_ads = client_permissions.advertisements.value | default: "all" | split: "&" %}
    {% for ad in allowed_ads %}
  • {{ad | replace: '-' " " | replace: '_' " " | capitalize }} advertisements are allowed until {{client_permissions.advertisements.expires | date: 'MMMM dd, yyyy, H:mm'}}.
  • {% endfor %}
{% endif %}