private function checkPermission(ActionEvent $event)
    {
        $environment = $event->getEnvironment();

        if (true === $environment->getDataDefinition()->getBasicDefinition()->isEditable()) {
            return true;
        }

        $inputProvider = $environment->getInputProvider();

        $event->setResponse(
            \sprintf(
                '<div style="text-align:center; font-weight:bold; padding:40px;">
                    You have no permission for edit model %s.
                </div>',
                ModelId::fromSerialized($inputProvider->getParameter('id'))->getSerialized()
            )
        );

        return false;
    }