Skip to content

Commit

Permalink
fix for #51 'is_allowed() bug '
Browse files Browse the repository at this point in the history
  • Loading branch information
REJack committed Jul 28, 2015
1 parent fa22a5e commit 136ba68
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1472,13 +1472,20 @@ public function is_allowed($perm_par, $user_id=FALSE){
$query = $this->aauth_db->get( $this->config_vars['perm_to_user'] );

if( $query->num_rows() > 0){
return TRUE;
} elseif ($this->is_group_allowed($perm_id)) {
return TRUE;
return TRUE;
} else {
return FALSE;
}

if( $user_id===FALSE){
return $this->is_group_allowed($perm_id);
} else {
$g_allowed=FALSE;
foreach( $this->get_user_groups($user_id) as $group ){
if ( $this->is_group_allowed($perm_id, $group->id) ){
$g_allowed=TRUE;
}
}
return $g_allowed;
}
}
}

/**
Expand Down

0 comments on commit 136ba68

Please sign in to comment.