[BUGFIX] Allow non-Admins to delete Records finally 56/21456/2
authordkd-egerer Sascha Egerer <sascha@sascha-egerer.de>
Tue, 27 Nov 2012 00:42:59 +0000 (01:42 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 8 Jul 2013 18:33:47 +0000 (20:33 +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/21456
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
t3lib/class.t3lib_tcemain.php

index 71d5b80..011cb94 100644 (file)
@@ -4159,7 +4159,8 @@ class t3lib_TCEmain {
                global $TCA;
 
                        // 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 ($TCA[$table] && $uid) {