70643[FEATURE] Add configurable template for locked backend
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 9
- typo3/sysext/backend/Classes/Command/LockBackendCommand.php20+25 −7
- typo3/sysext/backend/Classes/Maintenance/MaintenanceInformation.php9new+119 −0
- typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php21+39 −11
- typo3/sysext/backend/Resources/Private/Language/locallang.xlf+9 −0
- typo3/sysext/backend/Resources/Private/Language/locallang_maintenance.xlf4new+17 −0
- typo3/sysext/backend/Resources/Private/Layouts/Maintenance.htmlnew+50 −0
- typo3/sysext/backend/Resources/Private/Templates/Maintenance/BackendLocked.html6new+8 −0
- typo3/sysext/backend/ext_conf_template.txt+9 −0
- typo3/sysext/core/Documentation/Changelog/12.2/Feature-94910-AddTemplateForLockedBackend.rstnew+46 −0
Review log 6399
Show 4874 earlier messages
-
Jochen Roth uploaded patch set 1 08/16/21, 20:05
-
Jochen Roth marked it work in progress 08/16/21, 20:05
-
core-ci voted on patch set 1 V -1 08/16/21, 20:08 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15208
-
Jochen Roth uploaded patch set 2 08/16/21, 20:36
-
Jochen Roth uploaded patch set 3 08/16/21, 20:38
-
core-ci voted on patch set 3 V -1 08/16/21, 21:00 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15212
-
Jochen Roth uploaded patch set 4 08/17/21, 11:34
-
core-ci voted on patch set 4 V +1 08/17/21, 11:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15230
-
Jochen Roth uploaded patch set 5 08/17/21, 12:17
-
Jochen Roth uploaded patch set 6 08/17/21, 12:21
-
Jochen Roth marked it ready for review 08/17/21, 12:33
-
core-ci voted on patch set 6 V +1 08/17/21, 12:42 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15234
-
Jochen Roth uploaded patch set 7 08/17/21, 12:43
-
core-ci voted on patch set 5 V +1 08/17/21, 12:44 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15232
-
core-ci voted on patch set 7 V +1 08/17/21, 12:55 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15235
-
Oli Bartsch commented on patch set 7 08/17/21, 15:10
LockBackendCommand.php:75We should check if the logoPath is validLockedBackendGuard.php:54Can we use strict types?LockedBackendGuard.php:54Should we use GeneralUtility::isValidUrl() instead?LockedBackendGuard.php:58I don't get this check. May you elaborate what this is for?locallang_maintenance.xlf:3I think this is not that important. However, let's add the real date here.locallang_maintenance.xlf:3This seems to be wrong.BackendLocked.html:5This does not seem like a login form ;)BackendLocked.html:7Do we really need this div?Feature-94910-AddTemplateForLockedBackend.rst:12Added to what? :)Feature-94910-AddTemplateForLockedBackend.rst:33How can I use those settings when initiating the lock in the backend instead of CLI? Doesn't sound comfortable if only CLI allows those settings and I have to type them again whenever I want to lock the backend. -
Jochen Roth uploaded patch set 8 08/18/21, 16:47
-
core-ci voted on patch set 8 V -1 08/18/21, 16:51 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15276
-
Jochen Roth marked it work in progress 08/18/21, 16:59
-
Jochen Roth uploaded patch set 9 08/18/21, 18:20
-
core-ci voted on patch set 9 V -1 08/18/21, 18:23 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15282
-
Jochen Roth uploaded patch set 10 08/18/21, 18:37
-
core-ci voted on patch set 10 V -1 08/18/21, 19:04 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15285
-
Jochen Roth uploaded patch set 11 08/19/21, 08:08
-
core-ci voted on patch set 11 V +1 08/19/21, 08:29 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15298
-
Jochen Roth uploaded patch set 12 08/19/21, 10:16
-
Jochen Roth marked it ready for review 08/19/21, 10:25
-
Jochen Roth updated the commit message in patch set 13 08/19/21, 10:25
-
core-ci voted on patch set 12 V +1 08/19/21, 10:37 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15301
-
core-ci voted on patch set 13 V +1 08/19/21, 10:38 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15302
-
Jochen Roth commented on patch set 13 08/19/21, 10:55
LockBackendCommand.php:67ReplyNow using the argument as it was before.LockBackendCommand.php:75ReplyDoneLockedBackendGuard.php:54ReplyDoneLockedBackendGuard.php:54ReplyDoneLockedBackendGuard.php:58ReplyChecks if the content is HTML. After having another look, it seems useless and obsolete now.locallang_maintenance.xlf:3ReplyDonelocallang_maintenance.xlf:3ReplyDoneBackendLocked.html:5ReplyTrue, removedBackendLocked.html:7ReplyNope ... remove it.Feature-94910-AddTemplateForLockedBackend.rst:12ReplyDone -
Oli Bartsch commented on patch set 13 08/19/21, 14:32
LockBackendCommand.php:71IMO this is unecessary hard to read. What about: if ($input->getOption($option) !== null) { $io->note('Option "' . $option . '" has no effect on "redirect" argument'); }LockBackendCommand.php:80What is this array_filter for?LockBackendCommand.php:82Do we really need a "service" for this? If at all, this service should also handle the fallbacks. Currently you have duplicated code here and in checkLockedBackend(). This service could be initialized with the "logo", "headline", "text" settings. In the constructor you can then apply the fallbacks. So no setters are needed. Something like: $lockFileContent = GeneralUtility::makeInstance( MaintenanceTemplateService::class, $input->getOption('logo'), $input->getOption('headline'), $input->getOption('text') )->render();LockedBackendGuard.php:52Same question as in the command, what is this for?LockedBackendGuard.php:56What happened to this exception. Do we not need it anymore?LockedBackendGuard.php:68This is now missing. Fells like the case that $lockContent is empty is not longer handled.MaintenanceTemplateService.php:50Should we check if fileExtension is an allowed image extension? -
Jochen Roth uploaded patch set 14 08/20/21, 15:19
-
core-ci voted on patch set 14 V -1 08/20/21, 15:22 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15332
-
Jochen Roth uploaded patch set 15 08/20/21, 15:35
-
core-ci voted on patch set 15 V -1 08/20/21, 15:49 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15336
-
Jochen Roth uploaded patch set 16 08/20/21, 17:23
-
core-ci voted on patch set 16 V -1 08/20/21, 17:51 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15339
-
Jochen Roth uploaded patch set 17 08/20/21, 18:12
-
core-ci voted on patch set 17 V -1 08/20/21, 18:31 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15341
-
Jochen Roth uploaded patch set 18 08/20/21, 18:34
-
Jochen Roth uploaded patch set 19 08/20/21, 18:38
-
core-ci voted on patch set 19 V +1 08/20/21, 18:54 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15345
-
Jochen Roth commented on patch set 19 08/20/21, 19:50
LockBackendCommand.php:71ReplyAckLockBackendCommand.php:80ReplyTo remove empty values so ?? operator can be used for fallbacks.LockBackendCommand.php:82ReplyAckLockedBackendGuard.php:52Replysee above :-)LockedBackendGuard.php:56ReplyYou are right. This is needed to cover the case someone emptied the file manually.LockedBackendGuard.php:68ReplyAdded it again.MaintenanceTemplateService.php:50ReplyYep, make sense. Also now resizing all allowed image formats and convert it to json except . -
Oli Bartsch commented on patch set 19 08/23/21, 14:27
LockBackendCommand.php:47We can/should remove this now since "static" is not longe set, right?LockBackendCommand.php:72when "redirect" argument is set.LockBackendCommand.php:84As mentioned, those fallbacks should be handled in the MaintenanceTemplate. Currently this is done at various places.LockBackendCommand.php:117Should not be needed, since fallback should not be handled here.LockedBackendGuard.php:47Both, LanguageService and ExtensionConfiguration are not needed here as those functionality should be done in the "Service" class.LockedBackendGuard.php:112Here we have the same code, see the other comment.LockedBackendGuard.php:166Could we integrate this into the new "Service" class, too? So just having two different methods for output. -
Oli Bartsch uploaded patch set 20 08/23/21, 15:08
-
Oli Bartsch commented on patch set 20 08/23/21, 15:09
LockBackendCommand.php:84ReplyDoneLockBackendCommand.php:117ReplyDoneLockedBackendGuard.php:47ReplyDoneLockedBackendGuard.php:112ReplyDoneLockedBackendGuard.php:166ReplyDone -
core-ci voted on patch set 20 V +1 08/23/21, 15:22 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15414
-
Anja Leichsenring commented on patch set 20 V -1 08/23/21, 16:36
with PHP 8.0 I get (1/1) #1476107295 TYPO3\CMS\Core\Error\Exception PHP Warning: Undefined array key "BE_USER" in /var/www/html/typo3/sysext/core/Classes/Resource/Security/StoragePermissionsAspect.php line 46 upon logout from BE. Can you please fix that? Nice feature, I like. -
Jochen Roth uploaded patch set 21 08/24/21, 09:55
-
core-ci voted on patch set 21 V +1 08/24/21, 10:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15485
-
Jochen Roth commented on patch set 21 08/24/21, 10:35
Reply
Thank you. This should be fixed now. -
Christian Kuhn commented on patch set 21 09/06/21, 14:25
Hey. Not entirely sure here: Merging this *now* would be a late feature, considering the feature freeze tomorrow. I think we should think about and look at two details: The backend maintenance lock can be done i a way that admins are still able to login, right? This can not be configured via cli, though? Furthermore, we should have a look at dependencies since this area should probably have a minimum amount of dependencies. Since fluid gets involved with the patch, we may want to not do this in v11 anymore, since fluid still has this heavy dependency to extbase. We're currently relaxing this, though, so maybe we should just postpone that patch to v12? -
Jochen Roth uploaded patch set 22 10/15/21, 09:47
-
core-ci voted on patch set 22 V -1 10/15/21, 09:49 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18153
-
Jochen Roth uploaded patch set 23 10/15/21, 11:06
-
core-ci voted on patch set 23 V +1 10/15/21, 11:39 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18168
-
Guido Schmechel commented on patch set 23 V -1 10/30/21, 09:46
The idea is great and we should push this for v12. Unfortunately I still have 2-3 problems. Test 1 with default values => All good Test 2 with "fileadmin/logo.png" CLI reports this: PHP Warning: file_get_contents(/var/www/html/logo.png): Failed to open stream: No such file or directory in /var/www/html/typo3/sysext/backend/Classes/Maintenance/MaintenanceInformation.php line 97 => So the fileadmin folder is missing. Maybe you can test it again with the current master? I'm just unsure if this is due to my setup. Also, I wonder if we can't provide the same functionality as the normal logo? There you can also specify external image addresses, for example. -
Jochen Roth uploaded patch set 24 11/02/21, 13:26
-
Jochen Roth commented on patch set 24 11/02/21, 13:30
Reply
> CLI reports this: PHP Warning: file_get_contents(/var/www/html/logo.png): Failed to open stream: No such file or directory in /var/www/html/typo3/sysext/backend/Classes/Maintenance/MaintenanceInformation.php line 97 Thanks for reporting, this is fixed now. > Also, I wonder if we can't provide the same functionality as the normal logo? There you can also specify external image addresses, for example. Now you can also use remote files. But keep in mind, it will still download the file an include it in HTML. Because i wanted to have a static rendered HTML with all styles/images included. -
core-ci voted on patch set 24 V +1 11/02/21, 13:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18760
-
Benni Mack wrote 11/29/21, 10:15
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 25 11/29/21, 11:56
-
core-ci voted on patch set 25 V +1 11/29/21, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19977
-
Guido Schmechel rebased onto patch set 26 01/08/22, 14:09
-
core-ci voted on patch set 26 V +1 01/08/22, 14:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21811
-
Guido Schmechel commented on patch set 26 CR -1 01/08/22, 14:25
Small -1 for now, but i really like this feature!MaintenanceInformation.php:73We should push the function further down (line 80 and also 85). In case we use a config with EXT:, e.g. the default value EXT:backend/Resources/Public/Images/Logo.png, we get an exception because the URL is not retrievable. -
Jochen Roth uploaded patch set 27 01/10/22, 10:36
-
core-ci voted on patch set 27 V +1 01/10/22, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21833
-
Jochen Roth uploaded patch set 28 01/10/22, 11:01
-
Jochen Roth commented on patch set 28 01/10/22, 11:13
MaintenanceInformation.php:73ReplyThanks :-) Now also checking if the file is available locally using getFileAbsFileName() which solves this issue. Also fixed an issue where the local svg file was not displayed. -
core-ci voted on patch set 28 V +1 01/10/22, 11:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21838
-
Jochen Roth uploaded patch set 29 01/10/22, 12:00
-
Jochen Roth commented on patch set 29 01/10/22, 12:02
LockBackendCommand.php:47ReplyDoneLockBackendCommand.php:72ReplyDoneMaintenanceInformation.php:73ReplyDoneLockedBackendGuard.php:58ReplyDoneBackendLocked.html:5ReplyDoneBackendLocked.html:7ReplyDoneFeature-94910-AddTemplateForLockedBackend.rst:33Reply UnresolvedAlso works in case BE->adminOnly is set to -1
-
core-ci voted on patch set 29 V +1 01/10/22, 12:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21843
-
Jochen Roth uploaded patch set 30 01/17/22, 13:44
-
core-ci voted on patch set 30 V +1 01/17/22, 13:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22186
-
Guido Schmechel voted on patch set 30 V +1 CR +1 01/17/22, 14:02
-
Christian Kuhn commented on patch set 30 CR -1 01/17/22, 17:05
Hey. It seems we're relatively close to make backend templates configurable with a more general approach. Let's postpone this patch until this is settled to see how the locked backend view fits in there. -
Jochen Roth uploaded patch set 31 07/12/22, 10:04
-
core-ci voted on patch set 31 V -1 07/12/22, 10:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28960
-
Jochen Roth uploaded patch set 32 07/12/22, 10:40
-
core-ci voted on patch set 32 V +1 07/12/22, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28962
-
Andreas Kienast commented on patch set 32 CR -1 07/12/22, 15:18
LockBackendCommand.php:45As discussed in person - "only for redirect = static" contradicts the code flow in execute().MaintenanceInformation.php:44title and headline are always the same?MaintenanceInformation.php:80GeneralUtility::getUrl($this->logoPath) is called twice in this method.MaintenanceInformation.php:85I wonder what's the benefit of downloading the file just to render a base64 variant, especially since this is a blocking request and may cause troubles on huge files. Can't we use the URL in the src attribute directly? Of course, this needs handling for EXT: paths...LockedBackendGuard.php:144I know it has been 403 before already, but 503 (Service unavailable) fits more, IMO. -
Jochen Roth uploaded patch set 33 07/12/22, 17:30
-
core-ci voted on patch set 33 V +1 07/12/22, 17:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29002
-
Jochen Roth commented on patch set 33 07/12/22, 17:41
LockBackendCommand.php:45ReplyDoneMaintenanceInformation.php:44ReplyYes, now using only headline.MaintenanceInformation.php:80ReplyDoneMaintenanceInformation.php:85ReplyThe idea was to have everything in one single file and neither rely on any TYPO3 resources nor any external sources.LockedBackendGuard.php:144ReplyAck -
Simon Schaufelberger uploaded patch set 34 08/03/22, 21:33
-
Simon Schaufelberger uploaded patch set 35 08/03/22, 21:34
-
core-ci voted on patch set 34 V +1 08/03/22, 21:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29809
-
core-ci voted on patch set 35 V +1 08/03/22, 21:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29810
-
Chris Müller uploaded patch set 36 08/08/22, 17:46
-
core-ci voted on patch set 36 V +1 08/08/22, 17:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29961
-
Jochen Roth uploaded patch set 37
V +112/21/22, 04:00 -
core-ci voted on patch set 37 V -1 12/21/22, 04:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35256
-
Jochen Roth uploaded patch set 38
V -112/21/22, 04:27 -
core-ci voted on patch set 38 V +1 12/21/22, 04:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35259
-
Jochen Roth commented on patch set 38 CR -1 12/21/22, 04:40
For now, as i'm waiting for Lolli's response. -
Jochen Roth abandoned the change 07/04/23, 07:28
This feature is is only useful for very few people
LockBackendCommand.php:67