Skip to content
Snippets Groups Projects
Commit 86a364f9 authored by Stephan Großberndt's avatar Stephan Großberndt Committed by Christian Kuhn
Browse files

[BUGFIX] Create default backend user groups without EXT:dashboard

This patch corrects the optional last step of the initial setup
process "Create default backend user groups" if EXT:dashboard is
not installed. This may be the case for a composer based
installation. Instead of silently failing the step due to the
missing column "be_groups.availableWidgets" this permission is
not written to the database.

Resolves: #104434
Releases: main
Change-Id: I20216cb9032a36ad36a862289ba98082249b0a26
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85300


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 75ae9e81
Branches
Tags
No related merge requests found
......@@ -298,12 +298,18 @@ For each website you need a TypoScript record on the main page of your website (
$mappedPermissions['explicit_allowdeny'] = implode(',', $explicitAllowDeny);
}
}
if (isset($permissionPreset['availableWidgets']) && is_array($permissionPreset['availableWidgets'])) {
$databaseConnection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
if (
// availableWidgets is only available if typo3/cms-dashboard is installed
$databaseConnection->getSchemaInformation()->introspectTable($table)->hasColumn('availableWidgets')
&& isset($permissionPreset['availableWidgets'])
&& is_array($permissionPreset['availableWidgets'])
) {
$mappedPermissions['availableWidgets'] = implode(',', $permissionPreset['availableWidgets']);
}
if ($mappedPermissions !== []) {
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$connectionPool->getConnectionForTable($table)->update(
$databaseConnection->update(
$table,
$mappedPermissions,
['uid' => $recordId]
......
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