Review 9.5 Abandoned

64033[BUGFIX] Re-enable conditions within UserTSconfig

Benni Mack CR 0 V 0 Easy +10 −5 updated 05/08/20, 17:14

Commit message

The backend user aspect must be set before BE_USER->fetchGroups is called
and the TypoScript parser needs a proper ConditionMatcher object for the Symfony-based UserTSconfig conditions like [backend.user.isAdmin] to be
working.

Note to future self:
The reason why the original change was reverted was that:
- before workspace-related conditions did not work.
- then workspaces worked, but conditions in userTSconfig bricked partially
- the patch was reverted and left for dead for 1 year as it's a chicken-egg problem

The main issue is that fetchGroup() is doing too much.
- A valid user record exists, but the right workspace haven't been "set" which
  always returns workspace=0 for workspace-related conditions
- So the workspace must be initialized earlier, and not at the end of the fetchGroups()
  call.
- workspaceInit() - and some other code within fetchGroups() relies on finished TSconfig (that is the actual chicken-egg problem)

So we'll just set the aspects before, but BEFORE setting the aspects,
we'll evaluate the selected workspace of a user in a "plain" way.

The reason why the backend context aspect now works (again) is because the
context contains a "real" BE user object and fetches the data from the object,
where as the workspace aspect just contains a static property.

Review

  • Code review CR 0
  • Verified V 0

Issues 3

Files 3

Review log 38

  1. Benni Mack uploaded patch set 1 03/31/20, 14:52

  2. TYPO3com voted on patch set 1 V -1 03/31/20, 15:07 Completed build in 14m 07s on Tue, 31 Mar, 03:07 PM Test Summary: 374 of 75057 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-395

  3. TYPO3com commented on patch set 1 03/31/20, 15:33 Completed build in 54m 32s on Tue, 31 Mar, 03:33 PM Test Summary: 374 of 75057 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-395

  4. TYPO3com commented on patch set 1 03/31/20, 17:43 Completed build in 3h 45m 23s on Tue, 31 Mar, 05:43 PM Test Summary: 374 of 75057 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-395

  5. TYPO3com commented on patch set 1 04/05/20, 20:09 Completed build in 9h 02m 08s on Sun, 5 Apr, 08:09 PM Test Summary: 374 of 75057 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-395

  6. TYPO3com commented on patch set 1 04/05/20, 20:44 Completed build in 36s on Sun, 5 Apr, 08:44 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2206

  7. Oliver Hader voted on patch set 1 V -1 04/20/20, 16:46

  8. Benni Mack abandoned the change 05/08/20, 17:14

    won't have the time to work on this in my spare time for 9.5 anymore.