[eluser]seonet[/eluser]
I have a solution:
Code:
$uri_string = $this->ci->uri->uri_string();
$all_allowed_uris = $this->get_permissions_value('uri');
foreach($all_allowed_uris as $allowed_uris)
{
foreach($allowed_uris as $allowed_uri)
{
$strpos = strpos($uri_string, $allowed_uri);
// log_message('debug', "uri_string: " . $uri_string ." - allowed_uri: ". $allowed_uri ." - strpos: ". $strpos."\n\n");
if(is_int($strpos) && $strpos == 0)
{
$have_access = $allow;
break;
}
}
if ( isset($have_access) && $have_access)
{
break;
}
}
// Trigger event
$this->ci->auth_event->checked_uri_permissions($this->get_user_id(), $have_access);
if ( ! $have_access)
{
// User didn't have previlege to access current URI, so we show user 403 forbidden access
// $this->deny_access();
show_error('Acces Denied');
}