Say I have 3 users logged in to my application, one admin user and 2 normal users who share a set of permissions which are turned into roles, i.e. they each have ROLE_EDIT
, ROLE_ADD
and ROLE_DELETE
, for example.
While logged in, the admin user goes in and removes a role from their shared set of permissions, say the set goes from ROLE_EDIT, ROLE_ADD, ROLE_DELETE
to just ROLE_EDIT, ROLE_ADD
. We now want to remove the ROLE_DELETE
role from the two currently logged in users.
I know SecurityContextHolder
is thread scoped, so will only have the admin user's information in it. Is there an easy way to access the authentication information for the 2 currently logged in users so that I can remove that role without forcing them to log out and log back in?