Access Control of Controllers - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: Access Control of Controllers (/showthread.php?tid=62088) |
Access Control of Controllers - nasser.man - 06-08-2015 I use HMVC, ONE : how i can route all requests to my_controller/my_method? Quote:requests like : TWO : What is the best way for implement "ACCESS CONTROL" system? i have users and groups tables, defining privileges (any,none,authenticated,authorized,unauthenticated) for menu items and simple link_alias table. is this right way that :
RE: Access Control of Controllers - Hyper-X - 07-13-2015 I'm replying for your second request. Just create a base controller (MY_controller) in application/core folder. Here its content: PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); RE: Access Control of Controllers - Hyper-X - 07-13-2015 And your controllers must extend MY_Controller, not CI_Controller Code: class one_class extends MY_Controller |