Skip to Content
0
Oct 07, 2020 at 02:11 PM

Help neeeded to fetch the roles from the groups associated to the logged in User

17 Views

Hi ,

I need code help in getting the roles info from the groups associated to the logged in User.

I used below code to fetch the groups associated to the logged in user.

IUser user = UMFactory.getAuthenticator().getLoggedInUser();

String userName = user.getUniqueName(); String groupName = ""; String groupsList = ""; String str_grpname = "";

Iterator<?> groups = user.getParentGroups(false); while (groups.hasNext()) { str_grpname = groups.next().toString(); IGroup Group = UMFactory.getGroupFactory().getGroup(str_grpname); groupName = Group.getUniqueName(); groupsList = groupsList + "\n" + groupName; }

Thanks & Regards

Uday Kumar