你如何在 Opendege 中枚举 .getGroups()?
How do you enumerate though .getGroups() in Opendege?
我正在尝试使用对 Active Directory 的 .net 调用正确枚举我拥有的组。
如果我这样发消息,我的群组对象就会回来。
USING System.Security.Principal.*.
USING System.DirectoryServices.AccountManagement.*.
USING System.DirectoryServices.AccountManagement.PrincipalContext.
DEFINE VARIABLE networkPrincipalContextCls AS CLASS PrincipalContext NO-UNDO.
DEFINE VARIABLE nPrincipalUserCls AS CLASS UserPrincipal NO-UNDO.
nPrincipalUserCls = NEW UserPrincipal(networkPrincipalContextCls).
MESSAGE UserPrincipal:FindByIdentity(networkPrincipalContextCls,User):GetGroups() VIEW-AS ALERT-BOX.
我一直在谷歌搜索并寻找进度知识资源。我找不到有关如何执行此操作的示例或解释。如果有人知道我可以查看的任何资源或有一个示例可以使我朝着正确的方向前进,我将不胜感激。提前致谢!
我不确定,GetGroups() 结果中的项目是哪种类型,但是类似这样,基于 foreach.i:https://github.com/consultingwerk/ListsAndEnumSamples/blob/master/Consultingwerk/foreach.i
oGroups = UserPrincipal:FindByIdentity(networkPrincipalContextCls,User):GetGroups() .
{Consultingwerk/foreach.i Principal oItem in oGroups}
MESSAGE oItem:ToString() .
END.
我正在尝试使用对 Active Directory 的 .net 调用正确枚举我拥有的组。
如果我这样发消息,我的群组对象就会回来。
USING System.Security.Principal.*.
USING System.DirectoryServices.AccountManagement.*.
USING System.DirectoryServices.AccountManagement.PrincipalContext.
DEFINE VARIABLE networkPrincipalContextCls AS CLASS PrincipalContext NO-UNDO.
DEFINE VARIABLE nPrincipalUserCls AS CLASS UserPrincipal NO-UNDO.
nPrincipalUserCls = NEW UserPrincipal(networkPrincipalContextCls).
MESSAGE UserPrincipal:FindByIdentity(networkPrincipalContextCls,User):GetGroups() VIEW-AS ALERT-BOX.
我一直在谷歌搜索并寻找进度知识资源。我找不到有关如何执行此操作的示例或解释。如果有人知道我可以查看的任何资源或有一个示例可以使我朝着正确的方向前进,我将不胜感激。提前致谢!
我不确定,GetGroups() 结果中的项目是哪种类型,但是类似这样,基于 foreach.i:https://github.com/consultingwerk/ListsAndEnumSamples/blob/master/Consultingwerk/foreach.i
oGroups = UserPrincipal:FindByIdentity(networkPrincipalContextCls,User):GetGroups() .
{Consultingwerk/foreach.i Principal oItem in oGroups}
MESSAGE oItem:ToString() .
END.