#105567Frontend preview not working on restricted pages for normal editors
Description
Prerequisite:
All pages in the page tree are only allowed to access with a valid frontend user login.
- Log into TYPO3 with editor rights. The editor should have access to selected pages only!
- Select a page in the page tree and click on preview
- The preview will open
- Navigate to to a page which the backend user has edit rights -> preview is working
- Now navigate to a page which the editor has no rights to edit in TYPO3 but the current logged in frontend user is allowed to see
- You will get an error 403
Maybe #96658 is related?
Tested with TYPO3 v12.4.22
Reviews 3
Related issues 2
History 1216
-
Chris no-lastname-given changed Related to #96658 <span data-processor="relativetime" data-value="2024-11-11T11:14:27+00:00" > 11/11/24, 11:14 </span>
-
Garvin Hicking commented and changed category status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-11-11T13:49:21+00:00" > 11/11/24, 13:49 </span> -
Chris no-lastname-given commented <span data-processor="relativetime" data-value="2024-11-11T14:09:41+00:00" > 11/11/24, 14:09 </span>
Garvin Hicking wrote in #note-2:
> I stumble across “but the current logged in frontend user” – at which point do you log into the frontend?The website is an Intranet, so all pages are restricted to the access of frontend users only. The automatic login is done with Kerberos and the extension “causal/ig_ldap_sso_auth” (https://github.com/xperseguers/t3ext-ig_ldap_sso_auth/)
> Executing the preview on a specific page simulates a FE user, but your editor and fe user are not connected. If however you are logged in the FE and BE at the same time and then simulate, it could affect your session.
Yes, I am logged in as backend AND frontend user.
> Have you tried this in a way where you are not logged into the frontend seperately, only with a backend login and the preview functionality?
I have now tested without a logged in frontend user and I get the same error 403, if I navigate to a page, which is not editable for the backend user. For this scenario, I would say, the error is correct, because I am not logged in as a frontend user and so I should not be able to see the page.
-
Chris no-lastname-given commented <span data-processor="relativetime" data-value="2024-11-11T14:18:25+00:00" > 11/11/24, 14:18 </span>
Thinking a little more about your comment @ghi, I guess, that the frontend preview is granted to the pages of the current backend user only. The rights of the current frontend user are ignored. Maybe that’s the issue? Shouldn’t both rights (frontend and backend) be merged?
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-11-11T15:05:49+00:00" > 11/11/24, 15:05 </span>
I must admit I haven’t checked the code on this to be sure, but from my understanding, the BE user preview replaces a frontend user login by “logging in” with a fake frontend user that gets the permissions granted to view the current page. If you seperately browse to another page, your “actual” frontend user takes over, and then you only see what that FE user can see.
There should be a URL variable like “ADMCMD_simUser=2” that toggles that behavior; and that is only viable for those pages that are called with that variable. Normally the variable should be transferred over to all URLs when you navigate the page in the preview window. Does that happen for you?
-
Chris no-lastname-given commented <span data-processor="relativetime" data-value="2024-11-11T15:46:28+00:00" > 11/11/24, 15:46 </span>
Garvin Hicking wrote in #note-5:
> I must admit I haven’t checked the code on this to be sure, but from my understanding, the BE user preview replaces a frontend user login by “logging in” with a fake frontend user that gets the permissions granted to view the current page. If you seperately browse to another page, your “actual” frontend user takes over, and then you only see what that FE user can see.That is exactly, what I would expect too.
> There should be a URL variable like “ADMCMD_simUser=2” that toggles that behavior; and that is only viable for those pages that are called with that variable. Normally the variable should be transferred over to all URLs when you navigate the page in the preview window. Does that happen for you?
Yes, in my navigation, the parameter “?ADMCMD_simUser=1” is added for the preview of a backend user. It is always “?ADMCMD_simUser=1” regardless which user is logged in (not the backend user id) and it is added to all pages. Manually removing the parameter from the url does not stop throwing the 403 error for the pages, which are not allowed by the backend user.
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2025-03-02T10:32:03+00:00" > 03/02/25, 10:32 </span>
Maybe these are related or even the same?
https://forge.typo3.org/issues/105866
https://forge.typo3.org/issues/101589BTW reading https://forge.typo3.org/issues/105866 it looks like this has been solved on v.13
-
Sybille Peters changed Related to #101589 <span data-processor="relativetime" data-value="2025-03-08T09:29:09+00:00" > 03/08/25, 09:29 </span>
-
Chris no-lastname-given commented <span data-processor="relativetime" data-value="2025-03-10T09:09:44+00:00" > 03/10/25, 09:09 </span>
@speters What additional information can I provide to the section “How to reproduce” and the comments in this issue?
-
Sybille Peters commented <span data-processor="relativetime" data-value="2025-03-10T09:15:43+00:00" > 03/10/25, 09:15 </span>
I am sorry, I was looking at several issues and must have mixed something up. There are steps to reproduce in the description. Please ignore my comment. I will remove it if possible
-
Gerrit Code Review pushed patch set 2 for main to change 88762 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2025-03-27T11:32:03+00:00" > 03/27/25, 11:32 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 88797 <span data-processor="relativetime" data-value="2025-03-27T12:24:39+00:00" > 03/27/25, 12:24 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 88798 <span data-processor="relativetime" data-value="2025-03-27T12:24:52+00:00" > 03/27/25, 12:24 </span>
-
Gerrit Code Review pushed patch set 2 for 12.4 to change 88798 <span data-processor="relativetime" data-value="2025-03-27T12:28:30+00:00" > 03/27/25, 12:28 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-03-27T12:40:08+00:00" > 03/27/25, 12:40 </span>Applied in changeset commit:7e34ac73d0df9d88ee1fa9a8b75dbcdb272c2873.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:32:15+00:00" > 12/02/25, 14:32 </span>
I stumble across “but the current logged in frontend user” – at which point do you log into the frontend?
Executing the preview on a specific page simulates a FE user, but your editor and fe user are not connected. If however you are logged in the FE and BE at the same time and then simulate, it could affect your session.
Have you tried this in a way where you are not logged into the frontend seperately, only with a backend login and the preview functionality?