Bug #90773
closedAdminpanel simulate user group does not work with f:security ViewHelpers
100%
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
Updated by Henrik Ziegenhain over 4 years 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
Updated by Susanne Moog over 4 years ago
- Category changed from Authentication to AdminPanel
Updated by Susanne Moog over 4 years 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?
Updated by Georg Ringer over 4 years ago
- Related to Bug #86653: Preview of page, with "show", not working when starttime is set added
Updated by Henrik Ziegenhain over 4 years 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.
Updated by Susanne Moog over 4 years 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.
Updated by Gerrit Code Review over 4 years 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
Updated by Gerrit Code Review over 4 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/c/Packages/TYPO3.CMS/+/63794
Updated by Gerrit Code Review over 4 years 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
Updated by Gerrit Code Review over 4 years 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
Updated by Gerrit Code Review over 4 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/c/Packages/TYPO3.CMS/+/63794
Updated by Susanne Moog over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 85ca36a50e66f55841a3978b3e51412e3513efb5.