Commit 0f2f862b authored by Christian Kuhn's avatar Christian Kuhn Committed by Georg Ringer
Browse files

[TASK] Suppress mount point resolving if there are none

BE admins without mountpoints set have value '0' in
$this->groupData['webmounts']. If this is checked additonally
to empty string, some 'where uid=0' database calls can be suppressed.

Resolves: #86272
Releases: master
Change-Id: I4142034c3d3fac3c9319649fd39200da7955a8db
Reviewed-on: https://review.typo3.org/58290


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent 70fa16cd
......@@ -1433,11 +1433,10 @@ class BackendUserAuthentication extends AbstractUserAuthentication
$this->groupData['file_permissions'] = GeneralUtility::uniqueList($this->dataLists['file_permissions']);
$this->groupData['workspace_perms'] = $this->dataLists['workspace_perms'];
// Checking read access to webmounts:
if (trim($this->groupData['webmounts']) !== '') {
if (!empty(trim($this->groupData['webmounts']))) {
// Checking read access to web mounts if there are mounts points (not empty string, false or 0)
$webmounts = explode(',', $this->groupData['webmounts']);
// Explode mounts
// Selecting all webmounts with permission clause for reading
// Selecting all web mounts with permission clause for reading
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
$queryBuilder->getRestrictions()
->removeAll()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment