protected function _ensureStatus(Entity $entity)
    {
        if (!$entity->has('status')) {
            return;
        }

        if (!$entity->has('content_type') &&
            ($entity->has('content_type_id') || $entity->has('content_type_slug'))
        ) {
            if ($entity->has('content_type_id')) {
                $type = $this->ContentTypes->get($entity->get('content_type_id'));
            } else {
                $type = $this->ContentTypes
                    ->find()
                    ->where(['content_type_slug' => $entity->get('content_type_id')])
                    ->limit(1)
                    ->first();
            }
        } else {
            $type = $entity->get('content_type');
        }

        if ($type && !$type->userAllowed('publish')) {
            if ($entity->isNew()) {
                $entity->set('status', false);
            } else {
                $entity->unsetProperty('status');
            }
        }
    }