Commit 5204e90b authored by Stefan Busemann's avatar Stefan Busemann

Merge branch '439-security-team-notice' into 'develop'

[FEATURE] Add Security Team Notice

Closes #439

See merge request !468
parents 63faec6d 98b6ceed
Pipeline #8635 failed with stages
in 11 minutes and 45 seconds
......@@ -103,6 +103,11 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected $paypalUrl = '';
/**
* @var string
*/
protected $securityTeamNotice = '';
/**
* @var \DateTime
*/
......@@ -616,6 +621,22 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
$this->notifications = $notifications;
}
/**
* @return string
*/
public function getSecurityTeamNotice(): string
{
return $this->securityTeamNotice;
}
/**
* @param string $securityTeamNotice
*/
public function setSecurityTeamNotice(string $securityTeamNotice)
{
$this->securityTeamNotice = $securityTeamNotice;
}
public function getMatrixOfSupportedTypo3Versions(): array
{
$supportedTypo3Versions = [];
......
......@@ -19,10 +19,10 @@ return [
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Icons/extension.gif',
],
'interface' => [
'showRecordFieldList' => 'ext_key,forge_link,last_update,last_maintained,tags,versions,last_version,frontend_user,downloads,composer_name,repository_url,paypal_url,external_manual,expire',
'showRecordFieldList' => 'ext_key,forge_link,last_update,last_maintained,tags,versions,last_version,frontend_user,downloads,composer_name,repository_url,paypal_url,external_manual,expire,security_team_notice',
],
'types' => [
'1' => ['showitem' => 'ext_key,forge_link,last_update,last_maintained,tags,versions,last_version,frontend_user,downloads,composer_name,repository_url,paypal_url,external_manual,expire'],
'1' => ['showitem' => 'ext_key,forge_link,last_update,last_maintained,tags,versions,last_version,frontend_user,downloads,composer_name,repository_url,paypal_url,external_manual,security_team_notice,expire'],
],
'palettes' => [
'1' => ['showitem' => ''],
......@@ -244,6 +244,17 @@ return [
'foreign_table' => 'fe_users',
'MM' => 'tx_terfe2_extension_feuser_notification_mm'
]
]
],
'security_team_notice' => [
'exclude' => 1,
'label' => 'Security Team Notice',
'config' => [
'type' => 'text',
'rows' => 10,
'cols' => 40,
'eval' => 'trim',
],
],
],
];
......@@ -66,7 +66,13 @@
</f:for>
</tbody>
</table>
<button type="submit" class="btn btn-primary"><strong>Mark as insecure</strong></button>
<div>
<label for="securityTeamNotice">Security Team Notice</label>
<f:form.textarea property="securityTeamNotice" name="securityTeamNotice" class="form-control" />
</div>
<button type="submit" class="btn btn-primary"><strong>Update Extension</strong></button>
</f:form>
</f:then>
<f:else>
......
......@@ -56,6 +56,11 @@
</h4>
</div>
</f:if>
<f:if condition="{extension.securityTeamNotice}">
<div class="alert alert-warning mt-3 mb-3" role="alert">
{extension.securityTeamNotice}
</div>
</f:if>
<div itemscope itemtype="http://schema.org/SoftwareApplication">
<div hidden itemprop="applicationCategory">TYPO3 Extension</div>
......
......@@ -21,6 +21,7 @@ CREATE TABLE tx_terfe2_domain_model_extension (
expire int(11) unsigned default '0' NOT NULL,
likes int(11) unsigned default '0' NOT NULL,
notifications int(11) unsigned default '0' NOT NULL,
security_team_notice text,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
......
Markdown is supported
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