public function allowedToEdit(Page $page = null)
    {
        if ($page === null) {
            return true;
        }

        return Editor::isEnabled() && $this->gate->allows('edit', $page);
    }