Skip to content

Commit

Permalink
Enchantment on is_allowed() function #83
Browse files Browse the repository at this point in the history
  • Loading branch information
REJack committed Oct 27, 2015
1 parent c999d7c commit f51e1b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,11 @@ public function is_allowed($perm_par, $user_id=FALSE){
$user_id = $this->CI->session->userdata('id');
}

if($this->is_admin($user_id))
{
return true;
}

$query = $this->aauth_db->where('perm_id', $perm_id);
$query = $this->aauth_db->where('user_id', $user_id);
$query = $this->aauth_db->get( $this->config_vars['perm_to_user'] );
Expand Down

0 comments on commit f51e1b4

Please sign in to comment.