<script data-relocate="true">
$(function() {
- new WCF.Action.Delete('wcf\\data\\cronjob\\CronjobAction', '.jsObjectRow');
+ new WCF.Action.Delete('wcf\\data\\devtools\\project\\DevtoolsProjectAction', '.jsObjectRow');
});
</script>
<?php
namespace wcf\data\devtools\project;
use wcf\data\AbstractDatabaseObjectAction;
+use wcf\system\exception\IllegalLinkException;
/**
* Executes devtools project related actions.
* @inheritDoc
*/
protected $className = DevtoolsProjectEditor::class;
+
+ /**
+ * @inheritDoc
+ */
+ protected $requireACP = ['delete'];
+
+ /**
+ * @inheritDoc
+ */
+ protected $permissionsDelete = ['admin.configuration.package.canInstallPackage'];
+
+ /**
+ * @inheritDoc
+ */
+ public function validateDelete() {
+ if (!ENABLE_DEVELOPER_TOOLS) {
+ throw new IllegalLinkException();
+ }
+
+ parent::validateDelete();
+ }
}
<item name="wcf.acp.devtools.project.action"><![CDATA[Aktionen]]></item>
<item name="wcf.acp.devtools.project.add"><![CDATA[Projekt hinzufügen]]></item>
<item name="wcf.acp.devtools.project.edit"><![CDATA[Projekt bearbeiten]]></item>
+ <item name="wcf.acp.devtools.project.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} das Projekt <span class="confirmationObject">{$object->name}</span> wirklich löschen?]]></item>
<item name="wcf.acp.devtools.project.list"><![CDATA[Projekte]]></item>
<item name="wcf.acp.devtools.project.name"><![CDATA[Name]]></item>
<item name="wcf.acp.devtools.project.path"><![CDATA[Pfad]]></item>
<item name="wcf.acp.devtools.project.action"><![CDATA[Actions]]></item>
<item name="wcf.acp.devtools.project.add"><![CDATA[Add Project]]></item>
<item name="wcf.acp.devtools.project.edit"><![CDATA[Edit Project]]></item>
+ <item name="wcf.acp.devtools.project.delete.confirmMessage"><![CDATA[Do you really want to delete the project <span class="confirmationObject">{$object->name}</span>?]]></item>
<item name="wcf.acp.devtools.project.list"><![CDATA[Projects]]></item>
<item name="wcf.acp.devtools.project.name"><![CDATA[Name]]></item>
<item name="wcf.acp.devtools.project.path"><![CDATA[Path]]></item>