Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Simple Acl Bundle Laravel Package

alexdpy/simple-acl-bundle

View on GitHub
Deep Wiki
Context7

SimpleAclBundle

The easiest way to dynamic Access Control List

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 !

Install

$ composer require alexdpy/simple-acl-bundle

Enable the bundle

app/AppKernel.php:

<?php
// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new AlexDpy\AclBundle\AlexDpyAclBundle(),
        );
        // ...
    }
    // ...
}

Update your database schema

@see https://github.com/AlexDpy/Acl#update-your-database-schema

Configuration

Create a DatabaseProvider service

Choose an existing DatabaseProvider or create your own, and make it as a service.

app/config/services.yml:

services:
    app.acl.database_provider:
        class: AlexDpy\Acl\Database\Provider\DoctrineDbalProvider
        arguments:
            - @doctrine.dbal.default_connection

Add a little configuration

app/config/config.yml:

alex_dpy_simple_acl:
    database_provider: app.acl.database_provider

Let's go !

All is OK.

<?php

$acl = $this->container->get('alex_dpy_simple_acl.acl');

@see https://github.com/AlexDpy/Acl#usage for usage.

Use a CacheProvider

The ACL library uses DoctrineCache. The easiest way to create a CacheProvider service is to use DoctrineCacheBundle.

$ composer require doctrine/doctrine-cache-bundle

app/config/config.yml:

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

Schema options

app/config/config.yml:

alex_dpy_simple_acl:
    database_provider: app.acl.database_provider
    schema:
        permissions_table_name: acl_perm
        requester_column_length: 100
        resource_column_length: 100

Custom MaskBuilder

app/config/config.yml:

alex_dpy_simple_acl:
    database_provider: app.acl.database_provider
    mask_builder_class: My\Custom\MaskBuilder

@see https://github.com/AlexDpy/Acl#the-maskbuilder

Usage

@see https://github.com/AlexDpy/Acl#usage

License

MIT

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
phpshko/laravel-livewire-depdrop
larasell-dev/larasell
calliostro/spotify-bundle
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer