public function hasAccess(string $privilegeTarget, array $parameters = []): bool
    {
        if (!$this->securityContext->canBeInitialized()) {
            return false;
        }
        return $this->privilegeManager->isPrivilegeTargetGranted($privilegeTarget, $parameters);
    }
public function hasAccess(string $privilegeTarget, array $parameters = []): bool
    {
        if (!$this->securityContext->canBeInitialized()) {
            return false;
        }
        return $this->privilegeManager->isPrivilegeTargetGranted($privilegeTarget, $parameters);
    }
public function hasAccess ( string $ privilegeTarget , array $ parameters = [ ] ) : bool { if ( ! $ this -> securityContext -> canBeInitialized ( ) ) { return false ; } return $ this -> privilegeManager -> isPrivilegeTargetGranted ( $ privilegeTarget , $ parameters ) ; }
Returns true, if access to the given privilege-target is granted

@param string $privilegeTarget The identifier of the privilege target to decide on
@param array $parameters Optional array of privilege parameters (simple key => value array)
@return boolean true if access is granted, false otherwise
Returns true if access to the given privilege - target is granted