All Projects → FMCorz → Aclmanager

FMCorz / Aclmanager

Plugin to manage Acl for CakePHP 2.x

Projects that are alternatives of or similar to Aclmanager

crud-users
CakePHP: Users plugin based on the CRUD action classes
Stars: ✭ 17 (-71.19%)
Mutual labels:  cakephp, cakephp-plugin
Asset compress
An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.
Stars: ✭ 370 (+527.12%)
Mutual labels:  cakephp, cakephp-plugin
Authorization
PSR7 Middleware for authorization
Stars: ✭ 50 (-15.25%)
Mutual labels:  cakephp, cakephp-plugin
Enum
Enumeration list for CakePHP 3
Stars: ✭ 27 (-54.24%)
Mutual labels:  cakephp, cakephp-plugin
Crud
Production-grade rapid controller development with built in love for API and Search
Stars: ✭ 339 (+474.58%)
Mutual labels:  cakephp, cakephp-plugin
mixerapi
A CakePHP Plugin for RESTful API Development [READ-ONLY]
Stars: ✭ 26 (-55.93%)
Mutual labels:  cakephp, cakephp-plugin
queue
A queue-interop compatible Queueing library
Stars: ✭ 25 (-57.63%)
Mutual labels:  cakephp, cakephp-plugin
cakephp-sequence
CakePHP plugin for maintaining a contiguous sequence of records
Stars: ✭ 41 (-30.51%)
Mutual labels:  cakephp, cakephp-plugin
Cakepdf
CakePHP plugin for creating and/or rendering PDFs, supporting several popular PDF engines.
Stars: ✭ 360 (+510.17%)
Mutual labels:  cakephp, cakephp-plugin
cakephp-rest
CakePHP REST Plugin - Easily build REST API endpoints in your CakePHP application.
Stars: ✭ 23 (-61.02%)
Mutual labels:  cakephp, cakephp-plugin
Bootstrap Ui
CakePHP: Transparently use Bootstrap
Stars: ✭ 293 (+396.61%)
Mutual labels:  cakephp, cakephp-plugin
Cakephp Tools
A CakePHP Tools plugin containing lots of useful helpers, behaviors, components, shells, ...
Stars: ✭ 325 (+450.85%)
Mutual labels:  cakephp, cakephp-plugin
cakephp-api-pagination
📑 CakePHP 4 plugin that injects pagination information into API responses.
Stars: ✭ 39 (-33.9%)
Mutual labels:  cakephp, cakephp-plugin
Slug
Slugging for CakePHP
Stars: ✭ 32 (-45.76%)
Mutual labels:  cakephp, cakephp-plugin
cakephp-mailgun
Mailgun plugin for CakePHP 3
Stars: ✭ 23 (-61.02%)
Mutual labels:  cakephp, cakephp-plugin
Users
Users Plugin for CakePHP
Stars: ✭ 488 (+727.12%)
Mutual labels:  cakephp, cakephp-plugin
asset-mix
Provides helpers functions for CakePHP to use Laravel Mix.
Stars: ✭ 27 (-54.24%)
Mutual labels:  cakephp, cakephp-plugin
cakephp-glide
CakePHP plugin for using Glide image manipulation library
Stars: ✭ 34 (-42.37%)
Mutual labels:  cakephp, cakephp-plugin
crud-view
CakePHP: Automated admin backend based on your CRUD configuration
Stars: ✭ 45 (-23.73%)
Mutual labels:  cakephp, cakephp-plugin
Debug kit
Debug Toolbar for CakePHP applications.
Stars: ✭ 858 (+1354.24%)
Mutual labels:  cakephp, cakephp-plugin

AclManager for CakePHP 2.x

This plugins allows you to easily manage your permissions in CakePHP 2.x through the Acl module.

Features

  • Managing permissions for each node
  • Updating Database with missing AROs (Users, Roles, ...)
  • Updating Database with missing ACOs (Controller actions)
  • Revoking all permissions

Requirements

  • CakePHP 2.x

How to install

1. Set up your Acl environment

  • Install SQL tables through Cake Console
  • parentNode() method on your requester models

See: CakePHP: Simple ACL Controlled Application

2. Configure Auth in your AppController

It should look something like this:

var $components = array('Auth', 'Acl', 'Session');

function beforeFilter() {
    //Configure AuthComponent
    $this->Auth->authorize = array(
        'Controller',
        'Actions' => array('actionPath' => 'controllers')
    );
    $this->Auth->authenticate = array(
        'Form' => array(
            'fields' => array(
                'username' => 'login',
                'password' => 'password'
            )
        )
    );
    $this->Auth->loginAction = array(
        'controller' => 'users',
        'action' => 'login',
        'admin' => false,
        'plugin' => false
    );
    $this->Auth->logoutRedirect = array(
        'controller' => 'users',
        'action' => 'login',
        'admin' => false,
        'plugin' => false
    );
    $this->Auth->loginRedirect = array(
        'controller' => 'products',
        'action' => 'index',
        'admin' => false,
        'plugin' => false
    );
}

function isAuthorized($user) {
    // return false;
    return $this->Auth->loggedIn();
}

3. Download AclManager

Manually

Download the stable branch (https://github.com/FMCorz/AclManager/archive/stable.zip) and paste the content in your app/Plugin/ directory.

With Composer

  1. Install composer in the app/ folder of your project.
  2. Add "fmcorz/acl-manager": "stable" to your require key in your composer.json file. (More about this)
  3. Run php composer.phar install to install the plugin.

Composer documentation

4. Configure the plugin

See AclManager/Config/bootstrap.php

AclManager.aros : write in there your requester models aliases (the order is important)

5. Enable the plugin

In app/Config/bootstrap.php

CakePlugin::load('AclManager', array('bootstrap' => true));

6. Login with an existing user

The plugin conflicts with $this->Auth->allow(), do not use it. Just make sure that you are logged in.

7. Access the plugin at /acl_manager/acl

  • Update your AROs and ACOs
  • Set up your permissions (do not forget to enable your own public actions!)

8. Disable the authorizer Controller

Or uncomment return false in AppController::isAuthorized()

9. You're done!

Enjoy!

Licence

Licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].