Browse Source

fix for #51 'is_allowed() bug '

develop
Raphael Jackstadt 10 years ago
parent
commit
136ba686bd
  1. 15
      application/libraries/Aauth.php

15
application/libraries/Aauth.php

@ -1473,12 +1473,19 @@ class Aauth {
if( $query->num_rows() > 0){
return TRUE;
} elseif ($this->is_group_allowed($perm_id)) {
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;
}
}
}
/**

Loading…
Cancel
Save