/** * Verify Acl access * * @param mixed condition to validate * @param string acl driver id or null to check all * @param array user identifier to check in form array(driver_id, user_id) * @return bool */ public function has_access($condition, $driver = null, $entity = null) { $entity = $entity ?: $this->get_user_id(); if ($driver === null) { foreach (\Auth::acl(true) as $acl) { if ($acl->has_access($condition, $entity)) { return true; } } return false; } return \Auth::acl($driver)->has_access($condition, $entity); }