Commit 2491f759 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Benjamin Franzke
Browse files

[BUGFIX] Disallow deleting extensions in Composer mode

Deleting an extension in Extension Manager doesn't make much sense in a
Composer-based installation. For this reason, the removal of extensions
is prohibited now.

Resolves: #91456
Releases: master, 9.5
Change-Id: Ia96cf2741fd749d9f50540366351c8b576cac96b

Tested-by: default avatarTYPO3com <>
Tested-by: Markus Klein's avatarMarkus Klein <>
Tested-by: Benjamin Franzke's avatarBenjamin Franzke <>
Reviewed-by: Simon Gilli's avatarSimon Gilli <>
Reviewed-by: Mathias Brodala's avatarMathias Brodala <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Markus Klein's avatarMarkus Klein <>
Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <>
parent bd04cd12
......@@ -15,6 +15,7 @@
namespace TYPO3\CMS\Extensionmanager\Controller;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Package\Exception;
use TYPO3\CMS\Core\Package\Exception\PackageStatesFileNotWritableException;
......@@ -138,6 +139,13 @@ class ActionController extends AbstractController
protected function removeExtensionAction($extension)
try {
if (Environment::isComposerMode()) {
throw new ExtensionManagerException(
'The system is set to composer mode. You are not allowed to remove any extension.',
......@@ -112,7 +112,9 @@
<div class="btn-group">
<em:processAvailableActions extension="{extension}">
<em:updateScript class="btn btn-default" extensionKey="{extension.key}" />
<em:removeExtension class="btn btn-default" extension="{extension}" />
<f:if condition="!{isComposerMode}">
<em:removeExtension class="btn btn-default" extension="{extension}" />
<f:link.action action="downloadExtensionZip" controller="Action" arguments="{extension:extension.key}" title="{f:translate(key:'extensionList.downloadzip')}" class="btn btn-default">
<core:icon identifier="actions-system-extension-download" />
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment