---
title: "Feature"
description: "Efficiently apply policies to content nodes by using feature conditions for granular access control and optimal configuration. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/access-policies/conditions/feature"
---

# Feature

The `feature` condition allows you to constrain a policy statement so that it applies to content nodes that have a particular feature.

## Configuration

```
{
    "type": "feature",
    "config": {
        "qname": "{qname regex}"
    }
}
```

## Samples

This policy grants the Consumer role to all content with feature `f:thumbnailable`:

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "feature",
            "config": {
                "qname": "f:thumbnailable"
            }
        }]
    }]
}
```

This policy grants the Consumer role to all content with either the feature `f:thumbnailable` or `f:previewable`. This example uses an outer `or` condition to wrap two `feature` conditions.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "or",
            "conditions": [{            
                "type": "feature",
                "config": {
                    "qname": "f:thumbnailable"
                }
            }, {
                "type": "feature",
                "config": {
                    "qname": "f:previewable"
                }
            }]
        }]
    }]
}
```

Here is the same policy but rewritten to use regex.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "feature",
            "config": {
                "qname": "^(f:thumbnailable|f:previewable)$"
            }
        }]
    }]
}
```
