How to turn off logging back to same screen?

One of my client has specific use case where the same computer is used by multiple users who do not have the same access rights. After on user logs off or closes the application abnormally, when another user logs in, the system tries to load the last loaded screen. But when the 2nd user doesn’t have access right to that page, the systems gives error.

image

Error

image

In such use cases, how can we handle this problem?

Hi,

What Jmix version are you using? I tried 2.5.1, and the LogoutButton didn’t redirect me back to the last view.

Redirecting is implemented in io.jmix.securityflowui.authentication.LoginViewSupport#showInitialView. You can override this and provide any logic you need, for example, redirecting to the main view if the cached route is denied.

Regards,
Gleb