You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a user that have the permision "admin_dashboard", but is group not.
When I use this function to check if the user have the permision or not $this->aauth->control('admin_dashboard') The return false. It's not correct, because the user have it, but the group not. I've change the line 424 }else if ( ! $this->is_allowed($perm_id) OR ! $this->is_group_allowed($perm_id) ){ to }else if ( ! $this->is_allowed($perm_id) AND ! $this->is_group_allowed($perm_id) ){ And now work well.
I don't know if this change can affect the rest of the execution of the script.
The text was updated successfully, but these errors were encountered:
Yes, this is wrong, and it is not necessary to call is_group_allowed because is_allowed already checks whether the user has the permission, or if it participates if any group that has it. You can leave it like this: } else if ( ! $this->is_allowed ($perm_id) ) {
which will reduce the number of queries in your database.
I've a user that have the permision "admin_dashboard", but is group not.
When I use this function to check if the user have the permision or not
$this->aauth->control('admin_dashboard')
The return false.
It's not correct, because the user have it, but the group not.
I've change the line 424
}else if ( ! $this->is_allowed($perm_id) OR ! $this->is_group_allowed($perm_id) ){
to
}else if ( ! $this->is_allowed($perm_id) AND ! $this->is_group_allowed($perm_id) ){
And now work well.
I don't know if this change can affect the rest of the execution of the script.
The text was updated successfully, but these errors were encountered: