Project

General

Profile

Actions

Task #105690

closed

Allow table alias for BackendUserAuthentication->getPagePermsClause

Added by Anja Leichsenring about 20 hours ago. Updated about 19 hours ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2024-11-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Garvin Hicking about 19 hours ago

  • Status changed from Under Review to Closed
Actions

Also available in: Atom PDF