#111700The backend preview link has its own copy of the "Extend to Subpages" rule
Description
PreviewUriBuilder::getAdditionalQueryParametersForAccessRestrictedPages() adds parameters to the preview link of a page. These parameters simulate the frontend user groups and the access time that the page needs. A page also gets the restriction of each ancestor with “Extend to Subpages”.
PreviewUriBuilder has its own copy of this rule and reads the restriction fields by their names. In the frontend, RecordAccessVoter has the same rule and gets the field names from the TCA schema capabilities. Thus a change to one copy can make the backend preview and the frontend give different results.
The backend cannot use the voter for the preview link. The voter tells only if a record grants access. The backend needs the values of the restriction, because it simulates them in the preview link.
Proposal: an internal class finds the restriction of a page and of each ancestor that extends its restriction to subpages. It uses the rule of RecordAccessVoter and the TCA schema capabilities. PreviewUriBuilder uses this class. The behaviour does not change.
Reviews 1
Related issues 2
History 23
-
Matthias Vogel changed Related to #110664 12/02/26, 07:04
-
Gerrit Code Review pushed patch set 1 for main to change 98274 status
NewUnder Review 12/02/26, 08:40 -
Matthias Vogel changed Related to #111701 12/02/26, 08:42