Bug #85403
openCopy of recursive pagetree does not keep permissions of the copy-source
0%
Description
Problem/Description¶
initial situation¶
- Pagetree with configured page permissions for each/every subpage.
- backend user config allows recursive copying
Problem¶
- The copied pagetree doesn't keep any of the permissions (An editor have to configure each copied pagetree and can not really benefit (except the copied pagetree))
perms_userid,perms_groupid,perms_user,perms_group,perms_everybody
Test #1¶
I removed any PageTSConfig: all subpages getting the same permissions as the rootpage which get's copied.
Test #2¶
The root page includes following PageTSConfig:
TCEMAIN { // Permissions for "user" permissions.user = show,edit,delete,new,editcontent // Permissions for "group" permissions.group = show,edit,delete,new,editcontent // Set owner group permissions.groupid = 1 // Permissions for "everybody" permissions.everybody = }
All subpages get these permissions. I would assume that when copying a record only the UID and the PIP columns gets adjusted by the datahandler.
Acceptance Criteria¶
- All page permissions must be kept no matter if only one page or recursive pages are copied in the TYPO3 backend
Updated by Josef Glatz over 6 years ago
- Category deleted (
FormEngine aka TCEforms) - Parent task deleted (
#69617)
Updated by Josef Glatz almost 6 years ago
- Description updated (diff)
- TYPO3 Version changed from 8 to 9
Updated by Anonymous over 5 years ago
Can confirm this bug. TYPO3 9.5.5
Even using the TYPO3\CMS\Core\DataHandling\DataHandler to copy a tree ignores the permission.
$cmd = array(
'pages' => array(
$srcPid => array(
'copy' => array(
'action' => 'paste',
'target' => $targetPid,
'update' => array(
'title' => $newRootPageTitle,
'hidden' => 0,
)
)
)
)
);
$dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$dataHandler->copyTree = 99;
$dataHandler->defaultPermissions = [
'user' => 'show,edit,delete,new,editcontent',
'group' => 'show,edit,delete,new,editcontent',
'everybody' => 'show,edit,delete,new,editcontent'
];
$dataHandler->defaultValues = [
'pages' => [
'perms_groupid' => 1
]
];
// define which tables should be copied
$dataHandler->copyWhichTables = 'sys_template,tt_content,backend_layout';
$dataHandler->start([], $cmd);
$dataHandler->process_cmdmap();
This copies the tree but the permissions and the group is not set even I override the $dataHandler->defaultPermissions and $dataHandler->defaultValues.
Updated by Anonymous over 5 years ago
Well maybe I don't use the permission stuff in DataHandler the right way?
Setting
$GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPermissions'] = [
'user' => 'show,edit,delete,new,editcontent',
'group' => 'show,edit,new,editcontent',
'everybody' => 'show,edit,delete,new,editcontent'
];
in my AdditionalConfiguration.php and using the code above the permissions are set like defined in $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPermissions'].
But this does not solve the main problem that copied pages don't inherit the permissions from there source page.