Project

General

Profile

Actions

Bug #78274

closed

TCEFORM.pages.categories.config.treeConfig.rootUid only works for admin users

Added by Gerhard Rupp about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Category:
Categorization API
Target version:
-
Start date:
2016-10-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If TCEFORM.pages.categories.config.treeConfig.rootUid is set non-admin users only get shown the (new) root category but no child nodes.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #83257: [FOLLOWUP] TCEFORM.pages.categories.config.treeConfig.rootUid only works for admin usersClosed2017-12-07

Actions
Related to TYPO3 Core - Bug #90186: treeConfig.rootUid only works for admin users in flexformsClosed2020-01-23

Actions
Actions #1

Updated by Faktor E GmbH over 7 years ago

Gerhard Rupp wrote:

If TCEFORM.pages.categories.config.treeConfig.rootUid is set non-admin users only get shown the (new) root category but no child nodes.

This does work for fields but not in flexforms. I get the same issue.
If you set following code as an example for tt_address plugin, only the category with uid 78 but not the child notes are displayed (for admins this works):
TCEFORM.tt_content.pi_flexform.tt_address_pi1.sDEF.groupSelection.config.treeConfig.rootUid = 78

Testet with TYPO3 7.6.21 and tt_address 3.2.2

Actions #2

Updated by Christoph Lehmann about 7 years ago

I can confirm it with another category field. It has nothing to do with tt_address directly...

Actions #3

Updated by Christoph Lehmann about 7 years ago

The tree items are collected in DatabaseTreeDataProvider.php => loadTreeData()

        $this->loadTreeData();
        $this->emitPostProcessTreeDataSignal();

and then secured via SignalSlot in CategoryPermissionsAspect.php => lookUpCategoryMountPointInTreeNodes(), eg. checked if they match the collection of categories allowed through usergroups.

The problem is, that their parents are not checked, eg. if one of the parents categories is allowed through usergroups. For Admins that check is not done, see

    public function addUserPermissionsToCategoryTreeData(DatabaseTreeDataProvider $dataProvider, $treeData)
    {
        if (!$this->backendUserAuthentication->isAdmin() && $dataProvider->getTableName() === $this->categoryTableName) {

It has nothing to do with flexform field or not and looks broken in general... or a missing Feature? ;-)

Workaround: Allow every category you want so see under rootUid in your usergroup

Actions #4

Updated by Gerrit Code Review about 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54138

Actions #5

Updated by Gerrit Code Review about 7 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54141

Actions #6

Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54141

Actions #7

Updated by Gerrit Code Review about 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54141

Actions #8

Updated by Gerrit Code Review about 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54141

Actions #9

Updated by Gerrit Code Review almost 7 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54141

Actions #10

Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54725

Actions #11

Updated by Christoph Lehmann almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54725

Actions #13

Updated by Christoph Lehmann almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #14

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54138

Actions #15

Updated by Oliver Hader almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #16

Updated by Christoph Lehmann almost 7 years ago

  • Related to Bug #83257: [FOLLOWUP] TCEFORM.pages.categories.config.treeConfig.rootUid only works for admin users added
Actions #17

Updated by Gerhard Rupp almost 7 years ago

  • PHP Version changed from 7.0 to 7.1

Error still exists if category tree is embedded in a flexform.
For example:

TCEFORM.tt_content.pi_flexform.news_pi1.sDEF.settings\.categories.config.treeConfig.rootUid

does not work as exspected.

Actions #18

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions #19

Updated by Georg Ringer over 4 years ago

  • Related to Bug #90186: treeConfig.rootUid only works for admin users in flexforms added
Actions

Also available in: Atom PDF