2017 © Pedro Peláez
 

kohana-module kohana-acl

Kohana v3 ACL

image

dmitrymomot/kohana-acl

Kohana v3 ACL

  • Saturday, April 26, 2014
  • by dmitrymomot
  • Repository
  • 3 Watchers
  • 3 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Kohana ACL

ACL module for Kohana >= 3.3 based on Wouterrr/ACL + Wouterrr/A2, (*1)

Dependencies

Installation

First off, download and enable the module in your bootstrap., (*2)

Add the necessary tables and fields in the database using migrations:, (*3)

$ ./minion db:migrate --module=kohana-acl

Settings

.........., (*4)

Usage

Simple usage without file config or database

Add resource, (*5)

ACL::instance()->add_resource('news');

Add roles, (*6)

ACL::instance()->add_role('guest');
ACL::instance()->add_role('member');
ACL::instance()->add_role('editor');
ACL::instance()->add_role('admin');

Allow "guest" to "view" the news, (*7)

ACL::instance()->allow('guest', 'news', 'view');

Allow "member" to "comment" on "news", (*8)

ACL::instance()->allow('member', 'news', 'comment');

Allow "editor" to do anything, except "delete" news, (*9)

ACL::instance()->allow('editor', 'news');
ACL::instance()->deny('editor', 'news', 'delete');

Allow "admin" to do anything, (*10)

ACL::instance()->allow('admin');

Check permissions for current user, (*11)

ACL::check('news', 'edit'); // return boolean value

Check permissions for any role, (*12)

ACL::instance()->is_allowed('guest', 'news', 'comment');
ACL::instance()->is_allowed('editor', 'news', 'add');
ACL::instance()->is_allowed('admin', 'news', 'delete');

Drivers

Use Auth as driver

See demo application or use default driver which is wrapper for Auth., (*13)

Creating new driver

Class must implement interface ACL_Auth_Interface. For example see default driver, (*14)

The Versions

26/04 2014

dev-3.3/master

dev-3.3/master http://dmitrymomot.com/

Kohana v3 ACL

  Sources   Download

MIT

The Requires

 

framework acl kohana access control list

17/01 2014

dev-3.3/develop

dev-3.3/develop https://github.com/dimkof/kohana-acl

Kohana v3 ACL

  Sources   Download

MIT

The Requires

 

framework acl kohana access control list

17/01 2014

3.3.1

3.3.1.0 https://github.com/dimkof/kohana-acl

Kohana v3 ACL

  Sources   Download

MIT

The Requires

 

framework acl kohana access control list