Menu/Helper.php
public function isUserGranted($attributes, $subject = null): bool
    {
        return $this->security->isGranted($attributes, $subject);
    }
public function isUserGranted($attributes, $subject = null): bool
    {
        return $this->security->isGranted($attributes, $subject);
    }
Checks if the attributes are granted against the current authentication token and optionally supplied object.

@param mixed $attributes
@param mixed $subject

@return bool