Data Store

This section describes features that are coming in 4.0

The datastore condition allows you to constrain a policy statement so that it applies to datastores and/or objects within a datastore. The datastore can be matched using its Type, ID and/or a title.

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

Configuration

To match a changeset by Type:

{
    "type": "datastore",
    "config": {
        "typeId": "{value regex}"
    }
}

To match a changeset by ID:

{
    "type": "datastore",
    "config": {
        "id": "{value regex}"
    }
}

To match a changeset by ID:

{
    "type": "datastore",
    "config": {
        "title": "{value regex}"
    }
}

Samples

This policy document grants the Consumer role to a specific piece of content if it resides within a given datastore of type repository with ID 46ba5e0d79b83aac97ec.

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