Closed cweiske closed 2 years ago
Seems to work for at least one person: https://github.com/CDRO/simulatebe/issues/15#issuecomment-1116190214
Regarding the Error, maybe there needs to be a dependency on something, so that the extension is loaded after all core-packages that it potentially depends on (used to be sv
, which is core now). But I'll keep this in the back of my mind, if it happens again.
I'll release the new version during the next week, with due credits, of course.
New version released, should be online in the next hour or so.
Thanks!
:exclamation: Since the changes are substantial, I'd like to see tests by other users before this should be merged.
Middleware order
Biggest problem with v10 is that the order of the middlewares changed. In TYPO3v9, "typo3/cms-frontend/authentication" came first, and "typo3/cms-frontend/backend-user-authentication" second. simulatebe could squeeze between them.
With TYPO3v10 the order is switched:
This means we don't have a frontend user when we are called before backend-user-authentication, and can't rely on backend-user-authentication to initialize the backend user automatically after we simulated the backend user cookie.
Instead we call the backend-user-authentication middleware ourselves to let it handle the setup, even if it's called a second time now.
Logout process
We have to rely on the logoff_post_processing hook to logout the backend user when the frontend user is logged out, because we do not know that a frontend user existed when our middleware is called.
Cookie cleanup is still done in our middleware because that's easier to do than in the logoff hook.
Resolves: https://github.com/CDRO/simulatebe/issues/15