{{ permission }}

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

Properties

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

Examples

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

Developer Overview

Liquid Markup