AOEpeople / TYPO3_Restler

restler (PHP REST-Framework) for TYPO3
GNU General Public License v3.0
30 stars 17 forks source link

initializeBackendEndUser not compatible with TYPO3 v10.4 #56

Closed derhansen closed 3 years ago

derhansen commented 4 years ago

Since the extensions is marked as compatible with TYPO3 10.4, there should be a workaround / switch for the new TYPO3 bootstrap.

References:

For v10.4, the initializeBackendEndUser does not work any more. Code needs to be refactored like:

    public function initializeBackendEndUser()
    {
        if(!class_exists('\TYPO3\CMS\Core\Configuration\ExtensionConfiguration')) {
            if ($this->isBackEndUserInitialized === true) {
                return;
            }

            Bootstrap::initializeBackendUser();
            Bootstrap::initializeBackendAuthentication(true);
            Bootstrap::initializeLanguageObject();
        }

        $this->isBackEndUserInitialized = true;
    }

Note, the code above is not tested. I have an own BeUserAuthenticationController similar to the one in ext:restler, which I had to refactor as shown above.

sven-carstens commented 4 years ago

Thanks for the feedback. As I'm currently not using that functionality that escaped our integration tests.

felixsemmler commented 3 years ago

Sorry for the late feedback. I've released a new version for TYPO3V10. In our example extension restler_examples you can find a working example for BE-auth.