[BUGFIX] Check if user is allowed to paste page to pagetree
authorMax Roesch <typo3@elbebass.com>
Sat, 14 Apr 2012 17:41:48 +0000 (19:41 +0200)
committerErnesto Baschny <ernst@cron-it.de>
Thu, 12 Jul 2012 07:21:39 +0000 (09:21 +0200)
The user rights have checks for new / edit / delete, but paste was missing
leading to an error. Page actions 'paste into' and 'page after' now checks
if the user has rights for adding new pages to the current page.

Change-Id: I24b61c37ae76a4411ddb0b35feed46ab1f02f486
Fixes: #33546
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/11067
Reviewed-by: Wouter Wolters
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php

index a6a6e8c..da3b47b 100644 (file)
@@ -250,7 +250,7 @@ class t3lib_tree_pagetree_Node extends t3lib_tree_extdirect_Node {
         * @return bool
         */
        public function canBePastedInto() {
-               return intval($this->record['t3ver_state']) !== 2;
+               return $this->canCreate($this->record) && intval($this->record['t3ver_state']) !== 2;
        }
 
        /**
@@ -259,7 +259,7 @@ class t3lib_tree_pagetree_Node extends t3lib_tree_extdirect_Node {
         * @return bool
         */
        public function canBePastedAfter() {
-               return intval($this->record['t3ver_state']) !== 2;
+               return $this->canCreate($this->record) && intval($this->record['t3ver_state']) !== 2;
        }
 
        /**