[BUGFIX] Allow non-Admins to delete Records finally 80/10480/6
authordkd-egerer Sascha Egerer <sascha@sascha-egerer.de>
Tue, 27 Nov 2012 00:42:59 +0000 (01:42 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 15 Jun 2013 13:42:40 +0000 (15:42 +0200)
This patch adds the posibility for non Admins to delete
records finally in the recycler.

Change-Id: I1fda11d621403758f4d78b7fa8f730d7b47d79a7
Fixes: #34156
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/10480
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index dbb9637..f0849de 100644 (file)
@@ -4039,7 +4039,8 @@ class DataHandler {
         */
        public function deleteRecord($table, $uid, $noRecordCheck = FALSE, $forceHardDelete = FALSE, $undeleteRecord = FALSE) {
                // Checking if there is anything else disallowing deleting the record by checking if editing is allowed
-               $mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, $undeleteRecord, TRUE);
+               $deletedRecord = ($forceHardDelete || $undeleteRecord);
+               $mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, $deletedRecord, TRUE);
                $uid = intval($uid);
                if ($GLOBALS['TCA'][$table] && $uid) {
                        if ($mayEditAccess) {