Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
95343[FEATURE] Add `adminOnly` for TCA columns
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 4
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/43/95343/4 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/43/95343/4 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Issues 3
- Feature #110492Add adminOnly for TCA columns
- Bug #96215Display Condition HIDE_FOR_NON_ADMINS makes DataHandler wrongly treat these fields as access-restricted even when bypassAccessCheckForRecords is enabled
- Feature #87100Remove checkbox "Restrict editing for non-Admins" in Allowed excludefields for pages table in be_group
Files 15
- typo3/sysext/backend/Classes/Form/FormDataProvider/AdminOnlyCondition.phpnew+51 −0
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/AdminOnlyConditionTest.phpnew+76 −0
- typo3/sysext/core/Classes/Configuration/Tca/TcaEnrichment.php+1 −1
- typo3/sysext/core/Classes/Configuration/Tca/TcaMigration.php2+26 −1
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+1 −1
- typo3/sysext/core/Classes/Hooks/TcaItemsProcessorFunctions.php+39 −15
- typo3/sysext/core/Classes/Schema/Field/AbstractFieldType.php+5 −0
- typo3/sysext/core/Classes/Schema/Field/FieldTypeInterface.php+1 −0
- typo3/sysext/core/Configuration/TCA/pages.php+2 −2
- typo3/sysext/core/Configuration/DefaultConfiguration.php+5 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-110492-AddAdminOnlyForTCAColumns.rst4new+36 −0
- typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/ExcludeColumnsTest.php+12 −12
- typo3/sysext/core/Tests/Unit/Configuration/Tca/TcaEnrichmentTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Configuration/Tca/TcaMigrationTest.php+94 −0
- typo3/sysext/styleguide/Configuration/TCA/tx_styleguide_displaycond.php+16 −0
Review log 1216
-
Daniel Windloff uploaded patch set 1 08/16/26, 07:34
-
core-ci voted on patch set 1 V -1 08/16/26, 07:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106781
-
Daniel Windloff uploaded patch set 2
V -108/16/26, 07:46 -
core-ci voted on patch set 2 V +1 08/16/26, 07:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106782
-
Georg Ringer commented on patch set 2 08/16/26, 08:47
the issue I remember having with the DISPLAY_COND is that this if an editor copies the record, the value is not copied as well. how is this behaviour with the new flag? -
Daniel Windloff commented on patch set 2 08/16/26, 09:09
Reply
The behavior is the follwing: - Admin set values for columns with displayCond (1) and admin only (2) - Editor can not see these columns (1, 2) - If the editor copies this entry, the column with the displayCond (1) will be copied, the column with adminOnly (2) not - If the admin copies this entry, both columns (1,2) will be copied. -
Georg Ringer commented on patch set 2 08/16/26, 10:27
Reply
which means that would be a breaking change and I am not sure if this is desired? If someone sets up e.g. tsconfig_includes to configure e.g. a sysfolder, this behaviour should be copied as well, shouldn't it? -
Daniel Windloff commented on patch set 2 08/16/26, 14:14
Reply
I added a TCA migration to replace the display condition HIDE_FOR_NON_ADMINS with adminOnly, which has the former behavior of the display condition. That's why I don't see, that the change is breaking. To avoid this migration, you have to change the configuration to adminOnly=>false. To tsconfig_includes: I assume the opposite. If the page is copied by a non-admin, no PageTSConfig should be taken into account. This is the current behavior and double checked via TCA config and a specific hook: https://git.typo3.org/typo3/typo3/-/blob/main/typo3/sysext/core/Classes/Hooks/PagesTsConfigGuard.php?ref_type=heads -
Daniel Windloff rebased onto patch set 3
V +109/04/26, 06:56 -
Simon Schaufelberger commented on patch set 3 09/04/26, 07:17
TcaMigration.php:141Only one toFeature-110492-AddAdminOnlyForTCAColumns.rst:232 white spaces usedFeature-110492-AddAdminOnlyForTCAColumns.rst:322 white spaces used -
core-ci voted on patch set 3 V +1 09/04/26, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107815
-
Daniel Windloff uploaded patch set 4
V +109/04/26, 07:25 -
Daniel Windloff commented on patch set 4 09/04/26, 07:25
TcaMigration.php:141ReplyDoneFeature-110492-AddAdminOnlyForTCAColumns.rst:23ReplyDoneFeature-110492-AddAdminOnlyForTCAColumns.rst:32ReplyDone -
core-ci voted on patch set 4 V +1 09/04/26, 07:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107818
-
Benni Mack commented on patch set 4 09/08/26, 06:32
I wonder what the difference could then be between "exclude => true" and "adminOnly => true"? These options then depend on each. Also: We need an option "systemMaintainerOnly". What I'm saying is: I'd love to have a more flexible possibility than this. You know me... I've been thinking about this for a long time. Thus, I wonder if we need ONE new option that superseds "exclude", "HIDE_FOR_NON_ADMINS", "stepUp", and also allows to differentiate between read+write for a specific field, and we should allow to override this like overriding per a specific type (CType, doktype etc) in columnsOverrides. What do you think? -
Daniel Windloff commented on patch set 4 09/08/26, 08:09
Reply Unresolved
Hi Benni, The difference is that non-admins can also be granted rights via `exclude`. A more nuanced rights management system, such as `exclude` (group/user allowed), `AdminOnly`, `Systemmaintainer only`, etc., would certainly be beneficial. The goal of this change was to build upon an existing naming for an option for tables and remove the `displayConditions` from persistence to better differentiate between the DataHandler and the FormEngine. Even without a major overhaul, I saw this as an advantage. How should I proceed? Should I abandon the patch in favor of a more comprehensive access control concept?