Refresh session data / identity object

@MDebus
Thu, 05 Sep 2024 11:12:49 +0000

Okay maybe i found the problem. It wasn’t the RequestAuthorizationMiddleware. The Error occurs in view:

            if ($this->Identity->isLoggedIn() && $this->request->getAttribute('identity')->can('view', new User())) {
                echo $this->Html->link('Benutzer', '/users');
            }

Maybe that’s not best practice, but how can i get Authorization informations in view for navigation links?