#96215Display Condition HIDE_FOR_NON_ADMINS makes DataHandler wrongly treat these fields as access-restricted even when bypassAccessCheckForRecords is enabled
Description
The solution for #87100 changed the DataHandler to respect HIDE_FOR_NON_ADMINS when building the excludedTablesAndFields array.
exclude => true(to hide them for non-admin)- we give editors edit permission to these fields (so that editor-induced editing works via script-induced DataaHndler calls, for the subset of editors that have the edit rights for these fields)
HIDE_FOR_NON_ADMINSto not show these fields in regular list/edit module, but only make them available in our custom module
Because: we have a custom Backend Module for editors to edit these fields in a controlled distraction-free way.
This does not work on v10 anymore becasue of the now-respected HIDE_FOR_NON_ADMINS
This is a breaking change that was not documented at all.
When setting explicitly $dataHandler->bypassAccessCheckForRecords = true; then I expect that the access checks are bypassed completly. The new behaviour adds access restriction that are not “by-passable” by bypassAccessCheckForRecords.
Important: the setting is called “HIDE for”, not “RESTRICT for” and is just a displayCond (conditional display , not conditonal access )..
Reviews 1
Related issues 2
History 812
-
S P commented <span data-processor="relativetime" data-value="2021-12-06T08:32:33+00:00" > 12/06/21, 08:32 </span>
To make it more clear:
My fields are
exclude => truebut my editors have granted access to the field in their groups.My editors have no access via
db_mountpointsto the location of the datasets (can’t access in page tree), but my custom tree-independent BE module usesbypassAccessCheckForRecords = true.In my custom script the editors thus have field-access and location access. But display condition
I workaround this like this:HIDE_FOR_NON_ADMINSnow (as of #87100) acts as a hard access blocker which I can not circumvent in any case (not even withbypassAccessCheckForRecords = true).- remove
displayCond => HIDE_FOR_NON_ADMINS - remove the fields from
showitem - add
exclude => false
This makes my custom BE module work again for editors, BUT admins can not see the fields anymore in the regular edit panel (which is a real nuisance)!
A displayCond must not implcitly impose a permission check.
- remove
-
Georg Ringer commented <span data-processor="relativetime" data-value="2024-07-05T19:40:39+00:00" > 07/05/24, 19:40 </span>
see also #93276 where field values are not duplicated for editors. not sure how to handle that currently
-
Georg Ringer changed Related to #93276 <span data-processor="relativetime" data-value="2024-07-05T19:40:51+00:00" > 07/05/24, 19:40 </span>
-
S P commented and changed subject
since v10 displayCond HIDE_FOR_NON_ADMINS ignores these fields in custom DataHandler calls even when bypassAccessCheckForRecords is enabledDisplay Condition HIDE_FOR_NON_ADMINS makes DataHandler wrongly treats these fields as access-restricted even when bypassAccessCheckForRecords is enabled TYPO3 Version1012 <span data-processor="relativetime" data-value="2024-12-18T11:18:07+00:00" > 12/18/24, 11:18 </span>Still valid on v12. DataHandler wrongly treats the display condition
HIDE_FOR_NON_ADMINas an access restriction . -
S P changed subject
Display Condition HIDE_FOR_NON_ADMINS makes DataHandler wrongly treats these fields as access-restricted even when bypassAccessCheckForRecords is enabledDisplay Condition HIDE_FOR_NON_ADMINS makes DataHandler wrongly treat these fields as access-restricted even when bypassAccessCheckForRecords is enabled <span data-processor="relativetime" data-value="2024-12-18T11:18:16+00:00" > 12/18/24, 11:18 </span> -
S P commented and changed TYPO3 Version
1213 <span data-processor="relativetime" data-value="2024-12-19T10:01:57+00:00" > 12/19/24, 10:01 </span>Bug still present on v13
-
Gerrit Code Review pushed patch set 1 for main to change 95343 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-16T07:34:28+00:00" > 08/16/26, 07:34 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95343 <span data-processor="relativetime" data-value="2026-08-16T07:46:11+00:00" > 08/16/26, 07:46 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 95343 <span data-processor="relativetime" data-value="2026-09-04T06:56:53+00:00" > 09/04/26, 06:56 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 95343 <span data-processor="relativetime" data-value="2026-09-04T07:25:08+00:00" > 09/04/26, 07:25 </span>
The change is this:
https://github.com/TYPO3/typo3/commit/8828edaebff3436577d5c1e88b1a8402a4927e7b
The check was added to AbstractItemProvider AND DataHandler. However
HIDE_FOR_NON_ADMINSis onyl adisplayCond, no actualk user/group/database access restriction and thus must be ignored by DataHandler.I suggest that either thsi gets reverted or that
bypassAccessCheckForRecordsgets respected more widely.