74126[!!!][TASK] Simplify TCA authMode settings
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
- Stefan Bürk +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 31
- typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php2+3 −3
- typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php+1 −1
- typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumnItem.php+1 −1
- typo3/sysext/backend/Classes/View/PageLayoutView.php+1 −1
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php+0 −49
- typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php+4 −43
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+1 −1
- typo3/sysext/core/Classes/Hooks/BackendUserGroupIntegrityCheck.php+4 −7
- typo3/sysext/core/Classes/Hooks/TcaItemsProcessorFunctions.php6+13 −49
- typo3/sysext/core/Classes/Migrations/TcaMigration.php8+83 −35
- typo3/sysext/core/Configuration/DefaultConfiguration.php+0 −1
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+0 −6
- typo3/sysext/core/Configuration/FactoryConfiguration.php+0 −3
- typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97265-SimplifiedAccessModeSystem.rst2new+119 −0
- typo3/sysext/core/Resources/Private/Language/locallang_tca.xlf+1 −1
- typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php+4 −21
- typo3/sysext/core/Tests/Unit/Hooks/TcaItemsProcessorFunctionsTest.php+2 −154
- typo3/sysext/core/Tests/Unit/Migrations/TcaMigrationTest.php+410 −210
- typo3/sysext/frontend/Configuration/TCA/tt_content.php+2 −4
- typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php+2 −31
Show 11 more files
- typo3/sysext/install/Classes/Updates/BackendGroupsExplicitAllowDenyMigration.phpnew+132 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php+5 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedMatcher.php+6 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/BackendGroupsExplicitAllowDenyMigrationAfter.csvnew+6 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/BackendGroupsExplicitAllowDenyMigrationBefore.csv2new+6 −0
- typo3/sysext/install/Tests/Functional/Updates/BackendGroupsExplicitAllowDenyMigrationTest.phpnew+51 −0
- typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php+0 −63
- typo3/sysext/install/ext_localconf.php+2 −0
- typo3/sysext/linkvalidator/Classes/QueryRestrictions/EditableRestriction.php+2 −10
- typo3/sysext/linkvalidator/Tests/Functional/Repository/Fixtures/be_groups.csv+4 −4
- typo3/sysext/linkvalidator/Tests/Functional/Repository/BrokenLinkRepositoryTest.php+0 −2
Review log 1518
-
Christian Kuhn uploaded patch set 1 03/31/22, 13:02
-
core-ci voted on patch set 1 V -1 03/31/22, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25306
-
Christian Kuhn uploaded patch set 2 03/31/22, 15:31
-
core-ci voted on patch set 2 V +1 03/31/22, 15:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25311
-
Stefan Bürk voted on patch set 2 V +1 CR +1 03/31/22, 16:06
-
Benni Mack voted on patch set 2 V +1 CR +1 03/31/22, 16:36
-
Oli Bartsch commented on patch set 2 CR -1 03/31/22, 17:12
Testing -
Oli Bartsch commented on patch set 2 03/31/22, 19:05
NewContentElementController.php:301Could be renamedTcaItemsProcessorFunctions.php:410Could be adjusted.TcaItemsProcessorFunctions.php:418Could be renamed.TcaItemsProcessorFunctions.php:427Previous !(bool)($fieldConfig['authMode'] ?? false) check should be just fine, since 'explicitAllow' is the only possible option.TcaMigration.php:918Any reason for not using isset() ?TcaMigration.php:930Seems like this description does no longer describe the performed migration.TcaMigration.php:973Same question as above, any reason for not using isset() ?TcaMigration.php:976We do not change this to bool, since 3rd party might check fort the string explicitly, right?Breaking-97265-SimplifiedAccessModeSystem.rst:107This sounds like big upgrade efforts for administrators currently using "explicitDeny", especially with large user/group setups. Is there any possibility to invert DENY / ALLOW, like I did with the blinkLink[Fields|Options] in https://review.typo3.org/c/Packages/TYPO3.CMS/+/73866? Thinking about this, we would need the final items array which might be influenced by itemsProcFuncs.. not that easy I fear.BackendGroupsExplicitAllowDenyMigrationBefore.csv:7Should we just for the completnes also add an invalid case. Something like ,5,"aTable:aField:willBeKept:::,aTable:aField:toMigrate:ALLOW,aTable:aField:willBeRemoved:DENY" -
Christian Kuhn commented on patch set 2 03/31/22, 22:33
NewContentElementController.php:301ReplyDoneTcaItemsProcessorFunctions.php:410ReplyDoneTcaItemsProcessorFunctions.php:418ReplyDoneTcaItemsProcessorFunctions.php:427ReplyI'd say this variant is more explicit and we should go with it.TcaMigration.php:918Replyyes. I don't care about the value, even if it's false. array_key_exists() is more precise here.TcaMigration.php:930ReplyDoneTcaMigration.php:973Replyyes. this is simply more precise.TcaMigration.php:976Replyyeah. i wanted to key 'explicitAllow', since this reduces the migration overhead for the only 'sane' option that is currently in use in the wild.Breaking-97265-SimplifiedAccessModeSystem.rst:107Replyyes. there is no direct migration possible. This would give serious headaches. TER search showed no usages, though. So solution is to not migrate these, but let the upgrade wizard show "you need to update access rights for *these* fields manually".BackendGroupsExplicitAllowDenyMigrationBefore.csv:7Replyimho covered by ,3,"aTable:aField:toMigrate1:ALLOW:dangling,aTable:aField:okTuple" already. -
Christian Kuhn uploaded patch set 3 03/31/22, 22:33
-
core-ci voted on patch set 3 V +1 03/31/22, 22:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25323
-
Oli Bartsch voted on patch set 3 V +1 CR +1 04/01/22, 08:05
-
Benni Mack voted on patch set 3 V +1 CR +1 04/01/22, 08:06
-
Benni Mack commented on patch set 3 04/01/22, 08:06
not a fan of array_key_exists, but OK. -
Stefan Bürk voted on patch set 3 CR +1 04/01/22, 08:09
-
Stefan Bürk commented on patch set 3 V +1 04/01/22, 08:32
Reply
Ack. But there are (rare) case which it make sense. And in these cases, I think it is correct to use it. -
Benni Mack voted on patch set 3 V +2 CR +2 04/01/22, 08:36
-
Benni Mack merged patch set 4 04/01/22, 08:36