Project

General

Profile

Bug #97220

Updated by Torben Hansen about 2 years ago

When data is fetched from an extbase repository in backend context, it is not respected that the query should also respect the current workspace the backend user is working on. 

 Prerequisites: 

 * Extbase repository (ignore storage page) and a domain model 

 How to reproduce: 

 * Create a new record for the domain model 
 * Use the repository in FE context and use findAll() 
 * One record will be returned -> this is *correct* 

 * Switch to a workspace 
 * Create another record for the domain model 
 * Use the repository in FE context and use findAll() 
 * Two record will be returned -> this is *correct* 

 * Switch to live workspace 
 * Use the repository in FE context and use findAll() 
 * Two record will be returned -> this is _*not correct*_ since the hew record created in the workspace is not published 

 The function @getBackendConstraintStatement@ should add constraints for @t3ver_state@ and @t3ver_wsid@ constraints (see https://github.com/TYPO3/typo3/blob/main/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php#L738) depending on the workspace the user is working in.

Back