Project

General

Profile

Actions

Task #105690

closed

Allow table alias for BackendUserAuthentication->getPagePermsClause

Added by Anja Leichsenring about 23 hours ago. Updated about 21 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

Also available in: Atom PDF