Review main Work in progress Orphaned

88914[BUGFIX] Frontend users without group should be considered logged in

Alexander Schnitzler CR 0 V 0 Easy +3 −3 updated 04/02/25, 17:36

Commit message

FrontendUserAuthentication::createUserAspect() aggregates information
about the current user. Part of that information is assigned user
groups, both explicitly assigned ones which are records of fe_groups but
also virtual ones (-1 or -2).

If a user is logged in they should get the virtual group -2 assigned,
which grants access to pages whose access is restricted to "any logged
in user".

In the past, said virtual group (-2) was only assigned if the user had
at least any other actual group assigned, which per default TCA
definition (minitems=1) should apply all the time.

Besides that technical limitation however, there is no reason to not
have users without any group at all. While keeping the TCA limitation
for now, this change fixes the missing assignment of virtual group (-2)
for users without a group.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/14/88914/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/14/88914/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Files 1

Review log 34

  1. Alexander Schnitzler uploaded patch set 1 04/02/25, 11:12

  2. core-ci voted on patch set 1 V +1 04/02/25, 11:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76876

  3. Garvin Hicking commented on patch set 1 04/02/25, 12:26

    IMO having this in main to "test the waters" feels valid. I can't see what this possibly may break, but I can follow your argumentation and think it should be optional when we even have a fallback group in place.
  4. Markus Klein commented on patch set 1 04/02/25, 17:36

    I added one more thing in the ticket: https://forge.typo3.org/issues/106367#note-10