Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.42 KB

index.rst

File metadata and controls

53 lines (35 loc) · 1.42 KB

MongoDB Acl Provider

Installation using composer

To install MongoDBAclBundle using composer add following line to you composer.json file:

# composer.json
"iampersistent/mongodb-acl-bundle": "dev-master"

Use the composer update command to start the installation. After the installation add following line into the bundles array in your AppKernel.php file:

# AppKernel.php
new IamPersistent\MongoDBAclBundle\IamPersistentMongoDBAclBundle()

Configuration

To use the MongoDB Acl Provider, the minimal configuration is adding acl_provider to the MongoDb config in config.yml:

# app/config/config.yml
iam_persistent_mongo_db_acl:
    acl_provider:
        default_database: %mongodb_database_name%

The next requirement is to add the provider to the security configuration:

# app/config/security.yml
services:
    mongodb_acl_provider:
        parent: doctrine_mongodb.odm.security.acl.provider

security:
    acl:
        provider: mongodb_acl_provider

The full acl provider configuration options are listed below:

# app/config/config.yml
iam_persistent_mongo_db_acl:
    acl_provider:
        default_database: ~
        collections:
            entry: ~
            object_identity: ~

To initialize the MongoDB ACL run the following command:

php app/console init:acl:mongodb