Accessing User Groups from Spawner

Hello,

I’m trying to access the logged-in user’s group from the spawner.user object. Is this possible? The documentation unfortunately isn’t showing me a nice way to do this, and exploring the User object in debug mode also has not brought me any further.

Thanks for any help!

All the best,
Paul

It is possible! spawner.user.groups is a list of Group objects the user is a member of. e.g.

group_names = [group.name for group in spawner.user.groups]
1 Like