Giter VIP home page Giter VIP logo

acl's Introduction

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.

acl's People

Contributors

marcuspmd avatar

Stargazers

Serhii Siuziev avatar Mohamed El Mehdi Naouri avatar  avatar Vlad Polyakov avatar  avatar Cristiano Oliveira avatar Alexandre avatar

Watchers

Pham Quang avatar James Cloos avatar  avatar Ishan Rakitha avatar  avatar

acl's Issues

Folders outside root directory

Hi.... I just installed ACL ....
I dont know to configure application folder, I have this folder outside root directory.
The system cannot find the path specified. (code: 3)

I am developing a system where user is allowed to access allowed pages only and redirect if he access others.

Please help...

Fatal error in validation.php

After copying the files over to the appropriate directories and changing the application folder to the necessary folder I receive the following error when visiting the validation controller.

Fatal error: Can't use function return value in write context in C:\wamp\www\cp\1.0.0\controllers\validation.php on line 127

PHP Ver. 5.4.16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.