#90178Page edit button in page module is not using BackendUserAuthentication::recordEditAccessInternals() for checking access permissions
Description
Both in page and list module, permissions if a record is editable (and a button should be shown) are handled in BackendUserAuthentication::recordEditAccessInternals().
This function has a convenient hook, that makes it possible to apply your own access restrictions on some records.
However there appears to be one place in the page module, where this function is NOT used to check for record access:
*The page edit button.
The permissions for this button are internally checked in PageLayoutView::getTable_tt_content().
I added a screenshot to make it clear which button is meant.
For consistency, this button should use BackendUserAuthentication::recordEditAccessInternals(). as well as is done for all other places, where access permissions are checked.
Reviews 1
Related issues 2
Files 3
History 7
-
Christian Eßl changed description <span data-processor="relativetime" data-value="2020-01-23T07:37:15+00:00" > 01/23/20, 07:37 </span>
-
Christian Eßl changed description <span data-processor="relativetime" data-value="2020-01-23T08:06:55+00:00" > 01/23/20, 08:06 </span>
-
Georg Ringer changed Related to #89240 <span data-processor="relativetime" data-value="2020-02-14T21:59:01+00:00" > 02/14/20, 21:59 </span>
-
Riccardo De Contardi changed parent task #90674 <span data-processor="relativetime" data-value="2020-03-07T17:13:52+00:00" > 03/07/20, 17:13 </span>
-
Garvin Hicking commented and changed attached Screenshot 2024-07-12 at 12.06.30.png attached Screenshot 2024-07-12 at 12.07.00.png <span data-processor="relativetime" data-value="2024-07-12T10:16:25+00:00" > 07/12/24, 10:16 </span>
-
Christian Kuhn changed Related to #93411 <span data-processor="relativetime" data-value="2026-04-23T12:02:52+00:00" > 04/23/26, 12:02 </span>
-
Christian Kuhn commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-04-23T12:06:00+00:00" > 04/23/26, 12:06 </span>Hey. I looked at this and came to this conclusion after digging through quite some changes in this area:
This was effectively fixed with #93411: GridColumnItem::isEditable() now calls recordEditAccessInternals(), later migrated to checkRecordEditAccess(), which calls the hook.
I hope it is ok to close here. Let’s start fresh in case we still missed something.
For TYPO3v13, I’ve checked two places of this:
For language columns
-
typo3/sysext/backend/Resources/Private/Partials/PageLayout/LanguageColumns.htmlat Line 32, referencing Edit button via condition on “{allowEditContent}”.- set via
typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php,$backendUser->check('tables_modify', 'tt_content')- Screenshot: !Screenshot 2024-07-12 at 12.06.30.png!
Without language columns:
-
typo3/sysext/backend/Resources/Private/Partials/PageLayout/Grid/ColumnHeader.htmlat line 5, referencing Edit button via condition on “{allowEditContent}”.- also set via
BackendLayoutRendereras above- Screenshot: !Screenshot 2024-07-12 at 12.07.00.png!
The
check()method oftypo3/sysext/core/Classes/Authentication/BackendUserAuthentication.phphas a very general check in place:return isset($this->groupData[$type]) && ($this->isAdmin() || GeneralUtility::inList($this->groupData[$type], (string)$value));I guess one could replace the check in BackendLayoutRenderer to operate with
recordEditAccessInternalsinstead (or maybe even on top of it).