Define all groups for a specific user

I am currently creating a java method (part and managed by XPages bean) to retrieve groups of lists of which the user is a member (not necessarily the current user).

Is there any simple way to delete this information, or will I have to iterate over all the groups to verify the user, and also check if these groups are subgroups of other groups?

+5
source share
6 answers

Answered this on a blog: http://ntf.gbs.com/nathan/escape.nsf/d6plinks/NTFN-8TMHRP

The simple version is what you are looking for ...

lotus.notes.addins.DominoServer server = new lotus.notes.addins.DominoServer("YourCanonicalServerName");
Collection nameList = server.getNamesList("TheUserNameYou'reLookingFor");

That should be all you need.

+12
source

use these snippets:

XSPContext context = XSPContext.getXSPContext(FacesContext.getCurrentInstance());
DirectoryUser currentUser = context.getUser();
Vector<String> groups = new Vector(currentUser.getGroups());
+3

($ServerAccess) names.nsf, .

0

session.evaluate( "@UserNamesList" );

0

, () LotusScript , (IBM DeveloperWorks, ) . NotesGroupManager NotesGroup. XPages. , "" , . .

0

, , , . .

The GroupManager tools mentioned by Jasper are also a good example of LotusScript code that does most of what you want. The objects in Java are the same, the syntax is just a lot more disgusting.

/ Newbs

0
source