Welcome Guest, Not a member yet? Register   Sign In
Function level authentication
#1

[eluser]rtan[/eluser]
Hi,

I'm authenticating users in core\MY_controller.php in construct()
using code
Code:
if (!$this->ion_auth->logged_in())
further in a class I'm authorizing functions as
Code:
class Bills extends MY_Controller {
function __construct()
{
parent::__construct();
$c = $this->uri->rsegment(1); // The Controller
$f = $this->uri->rsegment(2); // The Function  
if (!($this->_allowed_function($c,$f))
{  
   redirect('auth/no_access');  
}
I am using Dynamic_menu.php with tables dyn_menu and function_mapping to generate drop down menu specific to login\role.

Now my issue is that there are a few functions, which I need to call through forms submission, and also AJAX requests, how do I authenticate these.

Thanks in advance.





Theme © iAndrew 2016 - Forum software by © MyBB