Bug #90773

Adminpanel simulate user group does not work with f:security ViewHelpers

Added by Henrik Ziegenhain over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
AdminPanel
Target version:
-
Start date:
2020-03-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There are the viewhelpers f:security.ifHasRole and f:security.ifAuthenticated to show or hide things in frontend.

When simulating a user group (or: when simulating a logged in user at all) these two ViewHelpers take no effect.

This is because in both cases the conditions are wrong. The Admin Panel does not set the correct property values.

Sadly I don't know how to set the necessary properties via Admin-Panel, so I cannot provide a patch :-(

Cheers
Henrik


Related issues

Related to TYPO3 Core - Bug #86653: Preview of page, with "show", not working when starttime is setClosed2018-10-14

Actions
#1

Updated by Henrik Ziegenhain over 1 year ago

f:security.ifHasRole
This VH has an early exit point checking if user isLoggedIn(). This property is not set by admin panel

f:security.ifAuthenticated
This VH checks the fe_user id. It has to be greater 0, but the user id is not set via frontend or is, mybe, a md5 hash.

I think in both cases the main issue is, that Adminpanel is simulating an user group and not an user.
On the other side, both VH checks properties of an user.

Reproducable with 9.5.13

HTH
Henrik

#2

Updated by Susanne Moog over 1 year ago

  • Category changed from Authentication to AdminPanel
#3

Updated by Susanne Moog over 1 year ago

  • Status changed from New to Needs Feedback

Can you check if this:
- works with v10
or if the patch in https://review.typo3.org/c/Packages/TYPO3.CMS/+/62936 fixes the problem in v9 please?

#4

Updated by Georg Ringer over 1 year ago

  • Related to Bug #86653: Preview of page, with "show", not working when starttime is set added
#5

Updated by Henrik Ziegenhain over 1 year ago

The mentioned patch does not solve the issue for me in v9.
Currently I do not have any v10 running, I hope to find some time to setup and test soon.

#6

Updated by Susanne Moog over 1 year ago

  • Status changed from Needs Feedback to Accepted
  • Assignee set to Susanne Moog

Ok, thanks for testing, I will have a look when I have some free time.

#7

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

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/c/Packages/TYPO3.CMS/+/63794

#8

Updated by Gerrit Code Review over 1 year 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/c/Packages/TYPO3.CMS/+/63794

#9

Updated by Gerrit Code Review over 1 year ago

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

#10

Updated by Gerrit Code Review over 1 year ago

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

#11

Updated by Gerrit Code Review over 1 year 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/c/Packages/TYPO3.CMS/+/63794

#12

Updated by Susanne Moog over 1 year ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF