src/Admin/AbstractAdmin.php
public function hasAccess($action, $object = null)
    {
        $access = $this->getAccess();

        if (!\array_key_exists($action, $access)) {
            return false;
        }

        if (!\is_array($access[$action])) {
            $access[$action] = [$access[$action]];
        }

        foreach ($access[$action] as $role) {
            if (false === $this->isGranted($role, $object)) {
                return false;
            }
        }

        return true;
    }
public function hasAccess($action, $object = null)
    {
        $access = $this->getAccess();

        if (!\array_key_exists($action, $access)) {
            return false;
        }

        if (!\is_array($access[$action])) {
            $access[$action] = [$access[$action]];
        }

        foreach ($access[$action] as $role) {
            if (false === $this->isGranted($role, $object)) {
                return false;
            }
        }

        return true;
    }
public function hasAccess ( $ action , $ object = null ) { $ access = $ this -> getAccess ( ) ; if ( ! \ array_key_exists ( $ action , $ access ) ) { return false ; } if ( ! \ is_array ( $ access [ $ action ] ) ) { $ access [ $ action ] = [ $ access [ $ action ] ] ; } foreach ( $ access [ $ action ] as $ role ) { if ( false === $ this -> isGranted ( $ role , $ object ) ) { return false ; } } return true ; }
Hook to handle access authorization, without throw Exception.

@param string $action
@param object $object

@return bool
Hook to handle access authorization without throw Exception .