title: Codeigniter 3.0 security by methods
body: <p>my doubt is: is there any way to do something like this in codeigniter</p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  
  class Users extends CI_Controller {
  
    public function __construct()
       {
           parent::__construct();
       }
  
    //This method only user with admin permission can access this
    public function onlyAdmin(){
    }
    //This method all user  can access this
    public function allUser(){
    }
  }
  </code></pre>
  
  <p>Something like that or more dynamic.</p>
  
  <p>Thanx for you time.</p>