在 WebSphere 7 中创建用户组作为子组(门户)

发布于 2024-10-16 11:18:01 字数 852 浏览 3 评论 0原文

在 websphere 7 门户服务器上运行的 portlet 中,我想创建一个新用户组,该用户组是现有组的子组。

这是代码(我尽可能缩短以保持焦点):

/* vars */
final PumaController controller = ...;
final PumaLocator locator = ...;
final PumaProfile pumeProfile = ...;
final groupCn = ... ;

/* code to add group */
final List<Group> parent = locator.findGroupsByAttribute("cn", CN_OF_GROUP);
final String parentDn = pumaProfile.getIdentifier(parent.get(0));
log.debug("creating new group with cn=" + groupCn + ", parentDn=" + parentDn);
newGroup = controller.createGroup(groupCn, parentDn, new HashMap<String, Object>(0));

调试语句打印:

创建新组 cn=[组Cn], ParentDn=cn=[CN_OF_GROUP],o=defaultWIMFileBasedRealm

该代码确实创建了一个组。但看起来parentDN 参数被忽略了。该组不是作为父组的子组创建的,而是作为顶级组创建的。 (如果我将 null 作为parentDn 传递,也会发生同样的情况)。

我在这里做错了什么?

In a portlet running on a websphere 7 portal server I want to create a new user group that is a subgroup of an existing group.

Here is the code (that I shortend as much as possible to keep the focus):

/* vars */
final PumaController controller = ...;
final PumaLocator locator = ...;
final PumaProfile pumeProfile = ...;
final groupCn = ... ;

/* code to add group */
final List<Group> parent = locator.findGroupsByAttribute("cn", CN_OF_GROUP);
final String parentDn = pumaProfile.getIdentifier(parent.get(0));
log.debug("creating new group with cn=" + groupCn + ", parentDn=" + parentDn);
newGroup = controller.createGroup(groupCn, parentDn, new HashMap<String, Object>(0));

The debug statement prints:

creating new group with
cn=[groupCn],
parentDn=cn=[CN_OF_GROUP],o=defaultWIMFileBasedRealm

The code DOES create a group. But it looks like the parentDN argument is ignored. The group is not created as a subgroup of parent, but it is created as a top level group. (Which is the same thing that happens if I pass null as parentDn).

What am I doing wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两人的回忆 2024-10-23 11:18:01

可能什么也没有。如果我是你,我会提出 PMR。

如果您配置了联合安全性而不是独立安全性,请顺便删除基于文件的领域。配置联合安全性时,您应该始终删除它。

Probably nothing. I would raise a PMR if I were you.

If you configured federated security instead of standalone security please delete the file based realm by the way. You should always delete it when configuring federated security.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文