希望在SharePoint中检索用户的组

时间:2014-03-05 00:06:11

标签: jquery sharepoint sharepoint-2010

我正在运行SharePoint Foundation 2010.我有一个基于声明的站点设置,以使用受信任的令牌提供程序。我正在传递一组确定用户组的声明。它们看起来与此类似:http://schemas.xmlsoap.org/claims/Group。在我的SharePoint端,我通过声明组为这些SharePoint组创建了一些SharePoint组和用户。权限工作得很好,但我可以操纵它们。

问题是我想从代码中获取这些用户的SharePoint组(最好是jQuery)我试图使用SPServices但运气不好。出于某种原因,我只能获得用户的组(如果他们已被直接添加(未通过他们的组添加)我遵循本教程http://azzu-sheikh.blogspot.com/2013/05/jquery-spservices-to-get-current-user.html,如果用户已被直接添加,则效果很好。

有人有什么想法吗?

1 个答案:

答案 0 :(得分:0)

什么是“声明组”?
使用SharepointPlus and the isMember function,我检查用户是否是Sharepoint组的直接成员,或者他是否是属于Sharepoint组成员的活动目录组的一部分。

例如,如果我是myteam@sharepoint.com的一部分,如果我将myteam@sharepoint.com添加到我的“Sharepoint Group”,那么isMember函数应该返回true $SP().isMember({user:"john_doe", group:"Sharepoint Group"}, function(isMember) { }) < / p>

此功能可以基于the distributionLists function执行此操作,该{{3}}将为用户找到分发列表(我上面称为“活动目录组”)。

我注意到这就是你要找的东西?!