95173[BUGFIX] Only offer actions on records the user may perform
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/73/95173/4 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/73/95173/4 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Merge conflicts 15
- main 92705[BUGFIX] Only offer translations of records the user may localize
- main 95741[BUGFIX] Offer localization only where it is permitted
- main 84892[TASK] Merge Permissions and Backend Users modules
- main 96978[FEATURE] Distinct actions for checkbox and dropdown
- main 95105[TASK] Apply PHP code simplifications
- main 91093[BUGFIX] Add accessible relation between dropdown and its toggle
- main 96319[FEATURE] Undo operations from their notification
- main 87873[WIP][BUGFIX] Make Dropdown Toggle Buttons more accessible
- main 96230[BUGFIX] Show records of all languages on root level in Records module
- main 95145[TASK] Migrate LanguageService->sL() labels to new domain syntax
- main 92589[TASK] Replace unneeded instanceof on xxx|null. Use a null check instead
- main 95453[WIP][TASK] Use ajax to load the delete message
- main 95308[TASK] Deprecate QueryBuilder::castFieldToTextType()
- main 91414[TASK] Generalize component conversion of button to dropdown item
- main 80762[WIP] Cleanup RecordList
Issues 1
Files 11
- typo3/sysext/backend/Classes/ContextMenu/ItemProviders/PageProvider.php+3 −1
- typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php+4 −1
- typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php4+95 −46
- typo3/sysext/backend/Classes/Security/RecordEditAccess.phpnew+199 −0
- typo3/sysext/backend/Tests/Functional/ContextMenu/Fixtures/CopyAccess.csvnew+18 −0
- typo3/sysext/backend/Tests/Functional/ContextMenu/ContextMenuTest.phpnew+57 −0
- typo3/sysext/backend/Tests/Functional/RecordList/DatabaseRecordListTest.php+97 −0
- typo3/sysext/core/Documentation/Changelog/14.3.x/Important-97663-EditlockProtectsRecordsAndPagesFromChangesByEditors.rstnew+59 −0
- typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/EditLock/CopyOfLockedRecordIsNotLocked.csvnew+7 −0
- typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/EditLock/Import.csvnew+21 −0
- typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/EditLockTest.phpnew+150 −0
Review log 2125
-
Juliane Wundermann uploaded patch set 1 08/08/26, 09:05
-
core-ci voted on patch set 1 V +1 08/08/26, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106165
-
Juliane Wundermann uploaded patch set 2
V +108/08/26, 09:56 -
core-ci voted on patch set 2 V +1 08/08/26, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106170
-
Tobias Liebig commented on patch set 2 V +1 08/08/26, 10:27
DatabaseRecordList.php:2211```suggestion // respect user permissions and editlock for checkbox generation $backendUser = $this->getBackendUserAuthentication(); ``` -
Juliane Wundermann uploaded patch set 3
V +108/08/26, 11:27 -
Juliane Wundermann commented on patch set 3 08/08/26, 11:29
DatabaseRecordList.php:2207ReplyDoneDatabaseRecordList.php:2211ReplyDone -
Tobias Liebig voted on patch set 3 CR +1 V +1 08/08/26, 11:36
-
core-ci voted on patch set 3 V +1 08/08/26, 11:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106174
-
Markus Klein commented on patch set 3 08/08/26, 13:37
Question: If I have only show-permission on the page, I should still be able to select the records for bulk export. Is that working with this patch? -
Juliane Wundermann commented on patch set 3 08/09/26, 08:37
Reply
The changes to the record list/checkbox only affect the record list and not the export. As far as I understand, the download in the record list is also unaffected: The download includes all records displayed in the list. The download button is only displayed when no record or checkbox is selected. As soon as a record is selected, the download button disappears and the edit and delete buttons appear instead. -
Markus Klein commented on patch set 3 08/10/26, 07:19
Reply
Right, checked that now myself. But if clipboards are enabled, there is also the transfer to clipboard button then, once selected. -
Juliane Wundermann commented on patch set 3 08/10/26, 10:13
Reply
As I understand it, the user should not be able to move or copy an element if they do not have permission to edit it. This applies regardless of whether the restriction is due to permissions, an edit lock, or a lack of access rights for a table or content element. If the checkbox isn’t there, the user can’t add the element to the clipboard, and therefore can’t copy or move it either. That’s the current behavior with the patch. Does that answer your question? If not, it would be great if you could describe the scenario that isn’t working right now, along with the expected behavior. -
Markus Klein commented on patch set 3 08/10/26, 10:48
Reply
Without this patch: If I'm an editor and the page or the record has set an edit-lock, I can still copy the element via the context menu. This is expected, I have read-permissions. This also works in bulk, so selecting a clipboard and checking multiple records and move them to the clipboard. With the patch: I have no checkbox anymore to copy multiple elements. -
Juliane Wundermann commented on patch set 3 08/11/26, 08:28
Reply
In the current main version, users can add an element with editlock to the clipboard, however, they receive an error if they try to paste or move the element. Therefore, I think it would make sense to hide the checkbox in these cases. This action could not be completed; please contact your administrator. Technical details: 1: Attempt to copy record "tt_content:129" without having permissions to do so [ERROR: Record was locked for editing. Only admin users can change this state.] -
Markus Klein commented on patch set 3 08/11/26, 09:02
Reply
Oh wow... wasn't aware of that. I'd consider this a bug. I'm really undecided now. Hiding the checkbox for the outlined use-case is of course totally fine. Hiding it for clipboard-interaction is IMO wrong, assuming we fix the bug that copying isn't working right now. I'm not going to vote negatively here, I just want awareness. IMO we first have to figure out if the copy-bug is for some reason intentional (and hence, not a bug then) - but I doubt that. I'm away now for some days, so maybe @j.wundermann@familie-redlich.de can you talk to the core team in Slack on their take? -
Juliane Wundermann commented on patch set 3 08/11/26, 09:16
Reply
Yeah, I can do that. Is there a dedicated channel for this, or should I just message someone? -
Markus Klein commented on patch set 3 08/11/26, 10:17
Reply
Thank you. #typo3-cms-coredev is the right channel for anything core development related. -
Juliane Wundermann commented on patch set 3 08/13/26, 20:13
Reply
I told Benni Mack about it, and he's thinking about it now. -
Benni Mack commented on patch set 3 09/23/26, 21:10
Reply
sorry, I never got back here. Editlock really means right now that moving or copying is indeed allowed. And we need to document this with an RST file. -
Benni Mack uploaded patch set 4
CR +1V +111/15/26, 17:16 -
Benni Mack commented on patch set 4 11/15/26, 17:17
Reply
Updated now... copying only needs show permission (as in DataHandler), so records you can't edit stay selectable for "transfer to clipboard". "Copy" is no longer offered for editlocked records and pages, in the record list and in the context menu, since DataHandler rejects those. The editlock behaviour is now documented in an Important changelog entry and checked by a functional test. -
Benni Mack commented on patch set 4 11/15/26, 17:19
So I have to restate it now: editlock does not allow copying or moving, because DataHandler declines both for non-admins already. A new Important RST documents what editlock does, and EditLockTest pins it down. - New internal service RecordEditAccess (canEdit() / canCopy()), mirroring what DataHandler accepts. It replaces the hand-rolled checks in DatabaseRecordList. - Record list: the checkbox is only rendered for records the user may change, or may copy while clipboard actions are shown. So show-only editors keep the bulk "transfer to clipboard" (@Markus). - "Copy" is no longer offered for records and pages the user can't copy (e.g. editlocked ones), in the record list and the context menu. -
core-ci voted on patch set 4 V +1 11/15/26, 17:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114555
-
Markus Klein commented on patch set 4 11/18/26, 13:52
Reply Unresolved
Thanks, I'll retest. I still struggle with the definition of "editlock". As the name suggests, I may not "edit" a record, but I may read it, e.g. to copy it. (makes sense for records that should serve as a copy-template for editors)
DatabaseRecordList.php:2207