# Path: deckhand/policies/base.py
# POLICY_ROOT = 'deckhand:%s'
# RULE_ADMIN_API = 'rule:admin_api'
# def list_rules():


from oslo_policy import policy
from deckhand.policies import base
Conditionally enforced for the endpoints below if the any of the documents in
the request body have a ``metadata.storagePolicy`` of "encrypted".""",
        [
            {
                'method': 'PUT',
                'path': '/api/v1.0/buckets/{bucket_name}/documents'
            },
            {
                'method': 'POST',
                'path': '/api/v1.0/rollback/{target_revision_id}'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'list_cleartext_documents',
        base.RULE_ADMIN_API,
        """List cleartext documents for a revision (with no layering or
substitution applied) as well as fully layered and substituted concrete
documents.""",
        [
            {
                'method': 'GET',
                'path': 'api/v1.0/revisions/{revision_id}/documents'
            },
            {
                'method': 'GET',
                'path': 'api/v1.0/revisions/{revision_id}/rendered-documents'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'list_encrypted_documents',

# Path: deckhand/policies/base.py
# POLICY_ROOT = 'deckhand:%s'
# RULE_ADMIN_API = 'rule:admin_api'
# def list_rules():


# Path: deckhand/policies/document.py
from oslo_policy import policy
from deckhand.policies import base

Conditionally enforced for the endpoints below if the any of the documents in
the request body have a ``metadata.storagePolicy`` of "encrypted".""",
        [
            {
                'method': 'PUT',
                'path': '/api/v1.0/buckets/{bucket_name}/documents'
            },
            {
                'method': 'POST',
                'path': '/api/v1.0/rollback/{target_revision_id}'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'list_cleartext_documents',
        base.RULE_ADMIN_API,
        """List cleartext documents for a revision (with no layering or
substitution applied) as well as fully layered and substituted concrete
documents.""",
        [
            {
                'method': 'GET',
                'path': 'api/v1.0/revisions/{revision_id}/documents'
            },
            {
                'method': 'GET',
                'path': 'api/v1.0/revisions/{revision_id}/rendered-documents'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'list_encrypted_documents',

        base.RULE_ADMIN_API,