dev-master
9999999-devSimple Acl Bundle
MIT
The Requires
The Development Requires
by Alexandre Dupuy
acl
0.1.0
0.1.0.0Simple Acl Bundle
MIT
The Requires
The Development Requires
by Alexandre Dupuy
acl
Wallogit.com
2017 © Pedro Peláez
Simple Acl Bundle
The easiest way to dynamic Access Control List, (*1)
This bundle is a wrapper of this ACL library. You want some dynamic ACL ? You think that the symfony/acl component is overkill and really hard to work on it ? You want an "easy to use" bundle ? This bundle is the answer !, (*2)
$ composer require alexdpy/simple-acl-bundle
app/AppKernel.php:, (*3)
<?php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new AlexDpy\AclBundle\AlexDpyAclBundle(),
);
// ...
}
// ...
}
@see https://github.com/AlexDpy/Acl#update-your-database-schema, (*4)
Choose an existing DatabaseProvider or create your own, and make it as a service., (*5)
app/config/services.yml:, (*6)
services:
app.acl.database_provider:
class: AlexDpy\Acl\Database\Provider\DoctrineDbalProvider
arguments:
- @doctrine.dbal.default_connection
app/config/config.yml:, (*7)
alex_dpy_simple_acl:
database_provider: app.acl.database_provider
All is OK., (*8)
<?php
$acl = $this->container->get('alex_dpy_simple_acl.acl');
@see https://github.com/AlexDpy/Acl#usage for usage., (*9)
The ACL library uses DoctrineCache. The easiest way to create a CacheProvider service is to use DoctrineCacheBundle., (*10)
$ composer require doctrine/doctrine-cache-bundle
app/config/config.yml:, (*11)
doctrine_cache:
providers:
acl_cache:
type: apc
namespace: simple_acl
alex_dpy_simple_acl:
database_provider: app.acl.database_provider
cache_provider: doctrine_cache.providers.acl_cache
@see https://github.com/AlexDpy/Acl#cache, (*12)
app/config/config.yml:, (*13)
alex_dpy_simple_acl:
database_provider: app.acl.database_provider
schema:
permissions_table_name: acl_perm
requester_column_length: 100
resource_column_length: 100
app/config/config.yml:, (*14)
alex_dpy_simple_acl:
database_provider: app.acl.database_provider
mask_builder_class: My\Custom\MaskBuilder
@see https://github.com/AlexDpy/Acl#the-maskbuilder, (*15)
@see https://github.com/AlexDpy/Acl#usage, (*16)
MIT, (*17)
Simple Acl Bundle
MIT
acl
Simple Acl Bundle
MIT
acl