protected function getRecordState($record)
    {
        if ($this->isVersioned()) {
            // Check stage this record belongs to
            $stage = $record->getSourceQueryParam('Versioned.stage') ?: Versioned::get_stage();

            // Non-live stages are automatically non-public
            if ($stage !== Versioned::LIVE) {
                return AssetManipulationList::STATE_PROTECTED;
            }
        }

        // Check if canView permits anonymous viewers
        return Member::actAs(null, function () use ($record) {
            return $record->canView()
                ? AssetManipulationList::STATE_PUBLIC
                : AssetManipulationList::STATE_PROTECTED;
        });
    }