You are not logged in.
Pages: 1
Hi,
I am looking to put ReportServer behind my company portal and have the portal forward the authenticated user's information to ReportServer for Single Sign-On without having them re-login to ReportServer.
So, I created a custom PAM and within the authenticate method, I was going to authenticate the user and assign them to their respective groups. I was able to authenticate the user but am having trouble with assigning the users to their respective groups. I am assigning the user to the groups by calling
user.setGroups(groups)
and then calling
userManagerService.persist(user)
on the user entity. However, this does not work and the user was not assigned to any groups.
Could you provide an example on how to correctly assign users to groups within a custom PAM?
Thanks,
Offline
Hi Kritsanapong,
pls try with
userManagerService.merge(user)
as your user already exists. Persist is only for creating the new user.
Regards,
Eduardo
Offline
Hi Eduardo,
Thanks for the response. I tried calling
userManagerService.merge(user)
and tried querying the user and calling
user.getGroups()
I can see the groups I assigned.
However, the users are still not shown under the group in the Adminstration > Users and Groups page
So I tried querying the groups after calling merge on the user and calling
group.getUsers()
However, this is returning an empty array.
Do I need to call merge on the each of the Group entities that I assign to the user too?
Offline
Hi Kritsanapong,
you should be able to set the users using:
net.datenwerke.security.service.usermanager.entities.Group.setUsers(Set<User>)
for the specific group.
Merging the modified groups should be enough. You don't need to merge the users.
Regards,
Eduardo
Offline
Pages: 1