Lee Chee Kiam
Lee Chee Kiam

Reputation: 12058

Spring Security: Find Groups A User Belongs To?

How do I find groups a user belongs to? I can use GroupManager.findAllGroups() then loop the group with GroupManager.findUsersInGroup(java.lang.String groupName). However, this is expensive. Do we have any straight forward method?

Thanks.

Upvotes: 3

Views: 890

Answers (1)

Lee Chee Kiam
Lee Chee Kiam

Reputation: 12058

After some research, there is no existing Spring Security API to do it, you may need to write the SQL yourself based on your database schema.

Upvotes: 1

Related Questions