PHPackages                             mmorinaga/cakephp3-aclmanager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. mmorinaga/cakephp3-aclmanager

ActiveCakephp-plugin[Admin Panels](/categories/admin)

mmorinaga/cakephp3-aclmanager
=============================

An acl-manager plugin for CakePhp3

00PHP

Since Jan 19Pushed 6y agoCompare

[ Source](https://github.com/mmorinaga/CakePhp3-AclManager)[ Packagist](https://packagist.org/packages/mmorinaga/cakephp3-aclmanager)[ RSS](/packages/mmorinaga-cakephp3-aclmanager/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

CakePhp3-AclManager
===================

[](#cakephp3-aclmanager)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![CakePHP 3](https://camo.githubusercontent.com/582c124400cc765a3645988baf8c3396a1041ce09f6f5f4344459fe6a9ea7467/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d43616b65506870253230332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://cakephp.org)[![Build Status](https://camo.githubusercontent.com/b095617881d2c1ead2b4e6bbac9e25ade902ff64d2c6d4ba5d539fda494f1176/68747470733a2f2f7472617669732d63692e6f72672f4a6350697265732f43616b65506870332d41636c4d616e616765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/JcPires/CakePhp3-AclManager)

Install
-------

[](#install)

```
    Composer require mmorinaga/cakephp3-aclmanager

```

or on composer.json

```
    "mmorinaga/cakephp3-aclmanager": "dev-master"

```

### Requirements

[](#requirements)

[CakePhp ACL](https://github.com/cakephp/acl)

How to
------

[](#how-to)

### Build your Acos

[](#build-your-acos)

First you need to build your acos, to do, you need to add this lines where you want. There are two way:

- By an event:

    ```
        use AclManager\Event\PermissionsEditor;

    ```

    ```
        $this->eventManager()->on(new PermissionsEditor());
        $acosBuilder = new Event('Permissions.buildAcos', $this);
        $this->eventManager()->dispatch($acosBuilder);

    ```
- By the component

    ```
        $this->loadComponent('AclManager.AclManager');
        $this->AclManager->acosBuilder();

    ```

NB: !!! Don't forget to delete those lines after building !!!

### Add permissions when creating a new group

[](#add-permissions-when-creating-a-new-group)

!!! Be caution, to works, you need first a first level ARO with base node full granted like a Super Admin like this on the aros\_acos table: create:1 read: 1 update: 1 delete: 1!!!

On your Admin/GroupsController.php

```
    use AclManager\Event\PermissionsEditor;

```

Add basics permissions, on your action add

```
    if ($this->Groups->save($group)) {

        if (isset($this->request->data['parent_id'])) {
            $parent = $this->request->data['parent_id'];
        } else {
            $parent = null;
        }

        $this->eventManager()->on(new PermissionsEditor());
        $perms = new Event('Permissions.addAro', $this, [
            'Aro' => $group,
            'Parent' => $parent,
            'Model' => 'Groups'
        ]);
        $this->eventManager()->dispatch($perms);
    }

```

### Edit permissions

[](#edit-permissions)

1. On your action edit()

```
we need to get all acos "not really necessary is just an automatic array builder":

```
    $this->loadComponent('AclManager.AclManager');
    $EditablePerms = $this->AclManager->getFormActions();
```

If you to exclude some actions for the form like ajax actions, you have to add a static property

On the specified controller like PostController or BlogController, ...:

```
    public static $AclActionsExclude = [
        'action1',
        'action2',
        '...'
    ];
```

You will have an array with all acos's alias indexed by the controller aco path like:

```
    'Blog' => [
        'add',
        'edit',
        'delete
    ],
    'Post' => [
        'add',
        'edit',
        'delete'
    ],
    'Admin/Post' => [
        'add',
        'edit',
        'delete'
    ]
```

```

2. Build your form

```
First if you want to use the AclManager Helper

```
    public $helpers = [
            'AclManager' => [
                        'className' => 'AclManager.AclManager'
                    ]
        ];

    // on your action in your controllerPath
    $EditablePerms = $this->AclManager->getFormActions();
```

an exemple with an Acl helper for checking if permissions are allowed or denied:

```

```

render:

```

        No
        Yes

```

```

If you don't use the Array Builder you need to specified your input name like aco path: App/Blog/add or App/Admin/Blog/add ... :base/:folder/:subfolder/:controller/:action "Folder and subfolder can be empty"

3. Update new permissions

```
```

    if ($this->request->is('post')) {

        $this->eventManager()->on(new PermissionsEditor());
        $perms = new Event('Permissions.editPerms', $this, [
            'Aro' => $group,
            'datas' => $this->request->data
        ]);
        $this->eventManager()->dispatch($perms);
    }

```

data need to be like this 'aco path' => value "0 deny / 1 allow"

```
    'App/Blog/add' => 0
    'App/Blog/edit' => 1
    ...
```

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/feecdf8ce8b3b26004463b05d4d3122cda78be7de3ef73ab6fe6d8e19d294479?d=identicon)[mmorinaga](/maintainers/mmorinaga)

---

Top Contributors

[![JcPires](https://avatars.githubusercontent.com/u/15987808?v=4)](https://github.com/JcPires "JcPires (4 commits)")[![mmorinaga](https://avatars.githubusercontent.com/u/20468423?v=4)](https://github.com/mmorinaga "mmorinaga (2 commits)")[![aipacommander](https://avatars.githubusercontent.com/u/6161879?v=4)](https://github.com/aipacommander "aipacommander (1 commits)")

### Embed Badge

![Health badge](/badges/mmorinaga-cakephp3-aclmanager/health.svg)

```
[![Health](https://phpackages.com/badges/mmorinaga-cakephp3-aclmanager/health.svg)](https://phpackages.com/packages/mmorinaga-cakephp3-aclmanager)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k4.8M43](/packages/jeroennoten-laravel-adminlte)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[dwij/laraadmin

LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like CRUD Generation, Module Manager, Media, Menus, Backups and much more

1.6k68.7k](/packages/dwij-laraadmin)[filament/spatie-laravel-media-library-plugin

Filament support for `spatie/laravel-medialibrary`.

1764.8M125](/packages/filament-spatie-laravel-media-library-plugin)[bezhansalleh/filament-exceptions

A Simple &amp; Beautiful Pluggable Exception Viewer for FilamentPHP's Admin Panel

193195.9k13](/packages/bezhansalleh-filament-exceptions)[filament/infolists

Easily add beautiful read-only infolists to any Livewire component.

1220.8M36](/packages/filament-infolists)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
