---
title: "Project"
description: "Optimize project policy conditions with regex matching for IDs or titles in project statements. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/access-policies/conditions/project"
---

# Project

The `project` condition allows you to constrain a policy statement so that it applies to entities that are contained within a project. The project can be matched using either its ID (`_doc`) or its `title`.

This condition supports regular expressions, allowing you to focus in on a single value or wildcard expressions for matches.

## Configuration

To match a project by ID:

```
{
    "type": "project",
    "config": {
        "id": "{value regex}"
    }
}
```

To match a project by Title:

```
{
    "type": "project",
    "config": {
        "title": "{value regex}"
    }
}
```

## Samples

This policy document grants the Consumer role to a specific piece of content if it resides within the project with ID `46ba5e0d79b83aac97ec`.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "project",
            "config": {
                "id": "46ba5e0d79b83aac97ec"
            }
        }]
    }]
}
```
