public function vote(TokenInterface $token, $object, array $attributes)
    {
        $user = $token->getUser();

        foreach ($attributes as $attribute) {
            if (!$this->supportsAttribute($attribute)) {
                continue;
            }

            if ($this->hasRole($token, 'ROLE_ADMIN')) {
                return VoterInterface::ACCESS_GRANTED;
            }

            if ($attribute == 'EDIT_USER') {
                $user2 = $object;
                return $this->usersHaveSameId($user, $user2) ? VoterInterface::ACCESS_GRANTED : VoterInterface::ACCESS_DENIED;
            }

            if ($attribute == 'EDIT_USER_ID') {
                $id = $object;
                return $this->hasUserId($user, $id) ? VoterInterface::ACCESS_GRANTED : VoterInterface::ACCESS_DENIED;
            }
        }

        return VoterInterface::ACCESS_ABSTAIN;
    }