How to find all logged in users in grails application

In this tutorial we assume that we already have grails application with Spring Security core plugin installed. We will explore how to retrieve currently logged-in users using the SessionRegistry. What is SessionRegistry? Maintains a registry of SessionInformation instances. Inject sessionRegistry as a bean in resources.groovy as follows import org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy import org.springframework.security.web.session.ConcurrentSessionFilter import org.springframework.security.core.session.SessionRegistryImpl beans =Read More…

Categories: Grails
Share:

Preventing a cycle while creating a tree

Background : In our application we are using a tree structure for representing some logic. The tree may contain another tree as a child node. The requirement was to parse the complete tree ┬ástructure by traversing it. While traversing the tree, if a child node refers to another tree, we have to parse this childRead More…

Categories: Grails
Share: