#16236permissions of versioned pages are not changed in draft workspace
Description
When you change the access permissions of a page in a draft-workspace and apply the changes recursively, the changes are not applied to subpages which already have a new version in this workspace. The permissions are not changed with the original versions either.
I located a bug in typo3/mod/web/perm/index.php (class SC_mod_web_perm_index), function getRecursiveSelect. This function creates the select-box for choosing if and how many levels the permissions should be set recursively.
The problem is that this function always uses the id of the live-record as supplied by t3lib_treeview::getTree. This function returns an array of pages, each with some fields from the page-record. One of the supplied fields is _ORIG_uid, which is the id of the workspace-record with versionized pages.
To fix the bug, I extended the function t3lib_treeview::getTree to add a attribute orig_ids_hierarchy to the current instance of the object. Normally ids_hierarchy is used, but this contains only the uids of the life-records.
The new attribute is used instead of ids_hierarchy in SC_mod_web_perm_index::getRecursiveSelect, so this function now respects the versionized pages when creating the select-box.
(issue imported from #M3666)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.