Issue Bug Closed

#22860typolinkLinkAccessRestrictedPages_addParams doesn't work on restricted subpages

Sven Teuber 06/10/10, 16:40 updated 06/11/13, 18:11

Description

If an access restriction is set with “include subpages”, TYPO3 won’t add params set in TS template to links that point to any of those subpages.

Set up an example page tree:

- public [ID = 1]
- restricted [ID = 2]
— page 1 [ID = 3]
—- subpage 1 [ID = 4]

Set page properties of page “restricted” to:
“Access” = some usergroup
“Include subpages” = checked

Set TS template, SETUP:
typolinkLinkAccessRestrictedPages = 1
typolinkLinkAccessRestrictedPages_addParams = &redirect_url=###PAGE_ID###

Now, set a link on page “public” that points to “restricted”.
Set a second link that points to “subpage 1”.

The link pointing to “restricted” will have the params added correctly:
index.php?id=1&redirect_url=2

The link pointing to “subpage 1” will be wrong:
index.php?id=4

This is due to a check in tslib_fe::checkPageGroupAccess(), which only checks the fe_group-field of the actual page, but does not check the rootline for “include subpages”-restricted pages.

The call is in tslib_cObj::typolink(), Line 6168

tslib_fe::checkPageGroupAccess() should probably check the rootline, too.

(issue imported from #M14690)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.