I would like to immediately propagate user changes (change of user roles) in my Grails application (I’m using Spring Security Plugin).
I’ve found this:
springSecurityService.reauthenticate(userName)
but this works for currently logged user, not for the change one!
Is there any easy solution for this (even force logout of changed users will suffice me).
The use-case for this is when the admin change some other user role. If the changed user is logged in, the role change isn’t seen immediately in the context of Spring Security.
I think you have to declare a spring security SessionRegistry. Take a look here concurrent-sessions and here list-authenticated-principals.
Then you can list and access authenticated users and modify them.