2017 © Pedro Peláez
 

library acl

Acl module for zend framework 3

image

vim/acl

Acl module for zend framework 3

  • Monday, January 22, 2018
  • by vanvas
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

acl

Module for Zend Framework 3., (*1)

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org., (*2)

composer require vim/acl

Register Vim\Acl in config/modules.config.php:, (*3)

<?php
return [
    'Vim\Acl',
];

Acl configuration

<?php
return [
    'acl' => [
        /**
         * ClassName instance of \Vim\Acl\Constant\RoleConstantAwareInterface
         */
        'roles' => null,
        'resources' => [
            /**
             * [resource, [privileges], [roles]]
             * To set all privileges, you can set "null" without [privileges]
             */
            'allow' => [],

            /**
             * [resource, [privileges], [roles]]
             * To set all privileges, you can set "null" without [privileges]
             */
            'deny' => [],
        ],
    ],
];

Example

<?php
return [
    'acl' => [
        'roles' => \Vim\Acl\Constant\RoleConstant::class,
        'resources' => [
            'allow' => [
                [Controller\User\UserController::class, null, ['admin']],
                [Controller\User\UserController::class, ['changePassword'], ['user']],
            ],
            'deny' => [
                [Controller\User\UserController::class, ['delete'], ['admin']],
            ],
        ],
    ],
];

The Versions

22/01 2018

dev-master

9999999-dev https://github.com/vanvas/acl.git

Acl module for zend framework 3

  Sources   Download

The Requires

 

acl php permissions zend framework zf3 module

22/01 2018