Skip to content
System of ACL (Acess control list) for CodeIgniter.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
controllers
models
screenshot
views/validation
LICENSE
readme.mkd

readme.mkd

First step:

Copy all files in your corresponding folders.

Create these table running this following SQL

CREATE TABLE `routine` (
  `id_routine` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` text,
  `name` varchar(100) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `module_id_module` int(10) unsigned DEFAULT NULL,
  `whitelist` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_routine`),
  UNIQUE KEY `link_UNIQUE` (`link`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

CREATE TABLE `permission` (
  `id_permission` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `routine_id_routine` int(10) unsigned NOT NULL,
  `user_id_user` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id_permission`),
  KEY `fk_permissao_rotina1` (`routine_id_routine`),
  KEY `fk_permissao_usuario1` (`user_id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

Second Step:

if you needed change any configuration of the application folder.

Controllers/validation.php

Line 47: $directoryList = FCPATH.'application/controllers/';

Run the url: {your_url}/validation

Last Step :

Include in your config/hooks.php the code below:

$hook['post_controller_constructor'] = array(
    'class'    => 'acl',
    'function' => 'permission_validation',
    'filename' => 'acl.php',
    'filepath' => 'models'
);  

and configure here your user id session.

Models/acl.php

Line 17: $ACL_USER = $this->session->userdata('id_user');

Congratulations, now your system has ACL.

You can’t perform that action at this time.