A simple yet easy to implement Role Based Access Control Library for popular PHP framework Codeigniter
- 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....!!!
v 0.3 Released!
Installation of this library is simple 4 steps
-
Put ezRbac in the third_party Directory of your application
-
Run the sqls in schema directory or create three tables in your database manually.
-
Set
$config['enable_hooks'] = TRUE;
at ./application/config/config.php -
Add a hook in ./application/config/hooks.php
$hook['post_controller_constructor'] = array(
'class' => 'ezRbacHook',
'function' => 'AccessCheck',
'filename' => 'ezRbacHook.php',
'filepath' => 'third_party/ezRbac'
);
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)
Its easy to enable with 2 steps
-
Set
$config['use_routing']=true;
at ./ezRbac/config/ez_rbac.php -
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';
)
Modify the configuration to match with your choice at ./ezRbac/config/ez_rbac.php
To use this library you you need Codeigniter 2.1