Skip to content

Commit

Permalink
fix for allow_user and allow_group problem #90
Browse files Browse the repository at this point in the history
  • Loading branch information
REJack committed Nov 9, 2015
1 parent 349bcad commit 50ddf8b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,10 @@ public function allow_user($user_id, $perm_par) {

$perm_id = $this->get_perm_id($perm_par);

if( ! $perm_id) {
return TRUE;
}

$query = $this->aauth_db->where('user_id',$user_id);
$query = $this->aauth_db->where('perm_id',$perm_id);
$query = $this->aauth_db->get($this->config_vars['perm_to_user']);
Expand Down Expand Up @@ -1601,8 +1605,17 @@ public function deny_user($user_id, $perm_par) {
public function allow_group($group_par, $perm_par) {

$perm_id = $this->get_perm_id($perm_par);

if( ! $perm_id) {
return TRUE;
}

$group_id = $this->get_group_id($group_par);

if( ! $group_id) {
return TRUE;
}

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

0 comments on commit 50ddf8b

Please sign in to comment.