Locale
This section describes features that are coming in 4.0
The locale
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 arbitrary matching path structures.
Configuration
{
"type": "locale",
"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",
"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",
"config": {
"locale": "^es.*"
}
}]
}]
}