diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-90333-Dashboard.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-90333-Dashboard.rst index 884f3e92021b460d376df27b79b0f5b72fbaa35f..41613a8aa325edb49171d807cdc57f7926af4ef1 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Feature-90333-Dashboard.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-90333-Dashboard.rst @@ -31,6 +31,7 @@ Available widgets The following widgets are shipped by core extensions now: * TYPO3 news: A widget showing the latest 5 news items from typo3.org (EXT:dashboard) +* TYPO3 security advisories: A widget showing the latest 5 security advisories from typo3.org (EXT:dashboard) * TYPO3: This widget will show you some background information about TYPO3 and shows the current version of TYPO3 installed (EXT:dashboard) * Getting started with TYPO3: This widget will provide a link to the Getting Started Tutorial (EXT:dashboard) * TypoScript Template Reference: This widget will provide a link to the TypoScript Template Reference (EXT:dashboard) diff --git a/typo3/sysext/dashboard/Classes/Widgets/T3SecurityAdvisoriesWidget.php b/typo3/sysext/dashboard/Classes/Widgets/T3SecurityAdvisoriesWidget.php new file mode 100644 index 0000000000000000000000000000000000000000..3d8b17dbdeaba4c171d9a8affc48a9ec0200e21a --- /dev/null +++ b/typo3/sysext/dashboard/Classes/Widgets/T3SecurityAdvisoriesWidget.php @@ -0,0 +1,31 @@ +<?php +declare(strict_types = 1); +namespace TYPO3\CMS\Dashboard\Widgets; + +/* + * This file is part of the TYPO3 CMS project. + * + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * The TYPO3 project - inspiring people to share! + */ + +/** + * This widget will show the latest security advisories from the TYPO3 news RSS feed + * right on the dashboard. + */ +class T3SecurityAdvisoriesWidget extends AbstractRssWidget +{ + protected $rssFile = 'https://typo3.org/?type=101'; + protected $lifeTime = 43200; // 12 hours cache + protected $title = 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3securityAdvisories.title'; + protected $description = 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3securityAdvisories.description'; + protected $iconIdentifier = 'content-widget-rss'; + protected $moreItemsLink = 'https://typo3.org/help/security-advisories'; + protected $moreItemsText = 'LLL:EXT:dashboard/Resources/Private/Language/locallang.xlf:widgets.t3securityAdvisories.moreItems'; +} diff --git a/typo3/sysext/dashboard/Configuration/Services.yaml b/typo3/sysext/dashboard/Configuration/Services.yaml index 1dd70867675e734123499a42b36759979170ec5e..711d9111cb5dd45e68f59b9b8cfe5db1490aef16 100644 --- a/typo3/sysext/dashboard/Configuration/Services.yaml +++ b/typo3/sysext/dashboard/Configuration/Services.yaml @@ -71,3 +71,10 @@ services: - name: dashboard.widget identifier: t3news widgetGroups: 'typo3' + + TYPO3\CMS\Dashboard\Widgets\T3SecurityAdvisoriesWidget: + arguments: ['t3securityAdvisories'] + tags: + - name: dashboard.widget + identifier: t3securityAdvisories + widgetGroups: 'typo3' diff --git a/typo3/sysext/dashboard/Resources/Private/Language/locallang.xlf b/typo3/sysext/dashboard/Resources/Private/Language/locallang.xlf index 4d1e13e2b42b46b826502175e635c69b08470c50..4ddb44c4523d6a4b0298e89bc70066108c3cffef 100644 --- a/typo3/sysext/dashboard/Resources/Private/Language/locallang.xlf +++ b/typo3/sysext/dashboard/Resources/Private/Language/locallang.xlf @@ -171,6 +171,16 @@ <source>Information about the number of failed logins during the last 24 hours.</source> </trans-unit> + <trans-unit id="widgets.t3securityAdvisories.title" xml:space="preserve"> + <source>TYPO3 security advisories</source> + </trans-unit> + <trans-unit id="widgets.t3securityAdvisories.description" xml:space="preserve"> + <source>Add a list of security advisories from the TYPO3 project</source> + </trans-unit> + <trans-unit id="widgets.t3securityAdvisories.moreItems" xml:space="preserve"> + <source>More TYPO3 security advisories</source> + </trans-unit> + <trans-unit id="widget_group.general" xml:space="preserve"> <source>General</source> </trans-unit>