Locale Matches

This section describes features that are coming in 3.3.

The node-locale-matches condition allows you to constrain a policy statement so that it applies to content nodes that have a matching locale. This condition supports regular expressions, allowing you to focus in on a single path, sub paths or arbitary matching path structures.

Configuration

{
    "type": "locale-matches",
    "config": {
        "locale": "{value regex}"
    }
}

Samples

This policy document grants the Consumer role to all content with locale es_ES.

{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "locale-matches",
            "config": {
                "locale": "es_ES"
            }
        }]
    }]
}

This uses a regex to match across all content in Spanish.

{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "locale-matches",
            "config": {
                "locale": "es.*"
            }
        }]
    }]
}