确定已定义用户的所有组 [英] Determine all groups for a defined user

查看:179
本文介绍了确定已定义用户的所有组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在创建java方法(和XPages受管bean的一部分)来检索用户(不一定是当前用户)所属的列表组.

I am currently creating a java method(part of and XPages managed bean) to retrieve a list groups a user(not necessarly current user) is a member of.

是否有任何简便的方法来重新获得此信息,或者我将不得不遍历所有组以检查用户,还需要检查这些组是否为其他组的子组?

Is there any easy method to retieve this information or am i going to have to loop through all the groups to check for the user and also check if those groups are sub groups of other groups?

推荐答案

在以下博客文章中对此进行了解答:

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

简单的版本就是您要寻找的是...

Simple version is that what you're looking for is...

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

那应该就是您所需要的.

That should be all you need.

这篇关于确定已定义用户的所有组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆