Skip to content
forked from xiidea/ezRbac

A simple yet easy to implement Role Based Access Control Library for popular PHP framework Codeigniter

Notifications You must be signed in to change notification settings

luthiereszero/ezRbac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ezRbac

A simple yet easy to implement Role Based Access Control Library for popular PHP framework Codeigniter

Key Features

  • Easy to integrate with Codeigniter Application
  • User Login system with password recovery integrated
  • Easy To Customize!!!
  • Integrated Access Control Management Interface
  • Configurable DB Table name
  • Support Clean Url routing!
  • Easy to adapt existing schema just by editing config file!!
  • Usable with your existing login system!
  • Coming more....!!!

Current Active Version

v 0.3 Released!

How To Install

Installation of this library is simple 4 steps

  1. Put ezRbac in the third_party Directory of your application

  2. Run the sqls in schema directory or create three tables in your database manually.

  3. Set $config['enable_hooks'] = TRUE; at ./application/config/config.php

  4. Add a hook in ./application/config/hooks.php

    $hook['post_controller_constructor'] = array(
            'class' => 'ezRbacHook',
            'function' => 'AccessCheck',
            'filename' => 'ezRbacHook.php',
            'filepath' => 'third_party/ezRbac'
        );

ezRbac Specific URL

logout url : /index.php/welcome/index/rbac/logout

acl manage url : /index.php/welcome/index/rbac/gui

If you have enabled the routing(see How to eneable Routing) then you can access all url like /rbac/(logout|gui)

How to eneable Routing

Its easy to enable with 2 steps

  1. Set $config['use_routing']=true; at ./ezRbac/config/ez_rbac.php

  2. set $route['^(rbac)/(.+)$'] =$route['default_controller']."/index/rbac/$2"; at /application/config/routes.php (where rbac can be replaced whatever you like by setting the $config['ezrbac_url']='rbac';)

Customization

Modify the configuration to match with your choice at ./ezRbac/config/ez_rbac.php

Dependencies

To use this library you you need Codeigniter 2.1

About

A simple yet easy to implement Role Based Access Control Library for popular PHP framework Codeigniter

Resources

Stars

Watchers

Forks

Packages

No packages published