Bug #34636
closedoption.disableDelete does not disable deletion
100%
Description
On our last UG-meeting we discovered a nice option for user-/page-TSconfig:
option.disableDelete
which 'Disables the "Delete" button in TCEFORMs.' [¹].
but instead of realy disabling the user to delete a record it only removed the delete-icon from the headarea (beside the store-icons)
the user is still able to delete records at 3 (maybe 4) different places:
list view with 'Extended view',
list view: contextmenu of record
page view: record head (visible on mouseover),
page view_ contextmenu of record (same as list view?)
[¹] http://typo3.org/documentation/document-library/core-documentation/doc_core_tsconfig/4.6.0/view/1/4/
It does not work in 4.5 and 4.6.
searching the net it seems to be broken around 4.3
Files
Updated by Tolleiv Nietsch over 12 years ago
- Status changed from New to Accepted
- Complexity set to easy
Updated by Fabian almost 12 years ago
I tried in 4.5.22 and this is still not working.
Complexity easy ?
It's been 10 Months :)
Updated by Ludwig Rafelsberger about 11 years ago
Seems not to work in 6.1.5 either. I'd really wish this functionality was removed from TSconfig documentation as long as it's broken, instead of wasting our users time trying to get that feature working.
Updated by Peter Kraume over 10 years ago
Too bad that there is still no solution for this issue.
Updated by Riccardo De Contardi over 9 years ago
- TYPO3 Version changed from 4.5 to 6.2
- Is Regression set to No
as far as I can see it is still present in 6.2.12.
Updated by Viktor Livakivskyi over 9 years ago
I would suggest not to remove this TSconfig option, but rather make it work =)
We have a case now, that editors should be able to just edit records - not create new or delete existing ones.
Forbidding of creation is done via mod.web_list.deniedNewTables.
But there is no clean solution to disble deletion. We use now hacky workaround, which consists of option.disableDelete, contextMenu.[key].disableItems = delete and disabling "Extended view" for an editor. And this is really bad solution.
Updated by Riccardo De Contardi about 9 years ago
the bug is still present in TYPO3 7.5-dev (latest master)
Updated by Teamgeist Medien over 8 years ago
- File PageLayoutView.php.patch PageLayoutView.php.patch added
- File DatabaseRecordList.php.patch DatabaseRecordList.php.patch added
The problem still exists.
At several places this option won't be checked anymore. I've created two patch files for DatabaseRecordList.php and PageLayoutView.php which will prevent the delete button to be displayed in the page and the list module. Due to lack of time this will only work for option.disableDelete = 1 and not option.[table].disableDelete, yet. But this can be implemented later easily.
Please notice that this will just prevent the buttons to be rendered. Maybe a user is able to delete records anyway if he finds out the URL to delete an item. Don't know if the moduleToken will prevent from such url-sniffing.
Still To Do:- Implement option.[table].disableDelete
- Hide the delete buttons in context-menus
- Check if url-sniffing is possible to delete records anyway
EDIT: This patch probably won't work in the list view when using gridelements which is overwriting the DatabaseRecordList with a Hook.
Greetings,
Paul Beck / Teamgeist Medien
Updated by Gerrit Code Review about 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49678
Updated by Gerrit Code Review about 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49678
Updated by Gerrit Code Review about 8 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49678
Updated by Gerrit Code Review about 8 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49678
Updated by Gerrit Code Review about 8 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49678
Updated by Tymoteusz Motylewski about 8 years ago
- Sprint Focus set to On Location Sprint
Updated by Anonymous about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 345608843e0c9d344189e939670506209948f464.
Updated by Gerrit Code Review about 8 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50122
Updated by Gerrit Code Review about 8 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50122
Updated by Gerrit Code Review about 8 years ago
Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50122
Updated by Anonymous about 8 years ago
- Status changed from Under Review to Resolved
Applied in changeset 57d9a4c36dbc7f2e1afa1ca8dd9972847020d2a6.