Task #105690
closedAllow table alias for BackendUserAuthentication->getPagePermsClause
0%
Description
The method provides a chunk of constraints to add to a custom query, taking care of page permissions for the logged in user.
Problem: the method will act upon the full table name 'pages', making it impossible to use page aliases for the query.
Example:
$queryBuilder = $connectionPool->getQueryBuilderForTable('pages); $queryBuilder->select('*')->from('pages', 'p')->where(...); $queryBuilder->andWhere( QueryHelper::stripLogicalOperatorPrefix($GLOBALS['BE_USER']->getPagePermsClause(Permission::PAGE_SHOW)), );
will lead to error like 'field pages.perms_everybody not known'.
In order to allow usage of alias, a second parameter to the function can be added and used.
Updated by Gerrit Code Review about 20 hours ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87220
Updated by Gerrit Code Review about 20 hours ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87220
Updated by Gerrit Code Review about 20 hours ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87220
Updated by Garvin Hicking about 19 hours ago
- Status changed from Under Review to Closed