---
title: "And"
description: "Optimize logical operations in policy documents with an 'and' condition to manage access to type-specific content. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/access-policies/conditions/and"
---

# And

The `and` condition lets you perform a logical AND operation across multiple sub-conditions.

## Configuration

```
{
    "type": "and",
    "config": {
        "conditions": [
            ... subconditions
        ]
    }
}
```

## Sample #1

This policy document allows a principal to read content from the `/products` so long as it is of type `my:article`.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "and",
            "config": {
                "conditions": [{
                    "type": "path",
                    "config": {
                        "path": "^/products/.*"
                    }
                }, {
                    "type": "type-qname",
                    "config": {
                        "qname": "my:article"
                    }
                }]
            }
        }]
    }]
}
```

## Sample #2

This policy document allows a principal to read content from the `/products` so long as it is of type `my:article` or `my:blogpost`.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "and",
            "config": {
                "conditions": [{
                    "type": "path",
                    "config": {
                        "path": "^/products/.*"
                    }
                }, {
                    "type": "or",
                    "config": {
                        "conditions": [{
                            "type": "type-qname",
                            "config": {
                                "qname": "my:article"
                            }
                        }, {
                            "type": "type-qname",
                            "config": {
                                "qname": "my:blogpost"
                            }
                        }]
                    }
                }]
            }
        }]
    }]
}
```
