Is there any way to achieve what I want to do here in Vaadin? In my system, users are categorized into 2 roles. one is administrator role and the other is regular user role. Administrators can put system into maintenance mode, and regular users can only see a “maintenance” landing page while system in maintenance mode. Administrators can still use system normally.
I can put logic in login page to redirect regular user to “maintenance” landing page. However, this doesn’t work for those users that already login to system because they don’t have go through login page again in order to use system. I am thinking when administrator put system into maintenance mode, I have system expire those regular user sessions. However, there seems no way to get all user sessions. UI.getSession() can only access the session belongs current user.
There is a trick to achieve this in Servlet by using Filter. my question is there anything similar in Vaadin or there is other better way to do what I want to do in Vaadin
PS: I use Vaadin session to store which role current user is. like following code: UI.getCurrent().getSession().setAttribute(“userKeyInSession”, user)
thank you,
Henry