SharePoint 2010 自定义声明提供程序
总之,
我最近尝试在 SharePoint 2010 中实现自定义声明提供程序。声明由数据库中的一些业务逻辑填充。
这些说法似乎正在向用户传达。这是很好的第一步。
下一步是检查人员选择器是否有效。
如果您单击“检查姓名”按钮,PeoplePicker 可以搜索并解析姓名。然而... 如果您进入 PeoplePicker,单击“浏览”,然后搜索您的声明,选择它并将其添加到“添加”框中,然后单击“确定”。没有任何反应,也没有向“授予权限”框中添加任何内容。 或者,如果您只是输入声明并单击“检查名称”按钮,它会很好地解决它,但如果您单击“确定”,它会清空该字段并显示其为必填字段。 或者,如果您输入声明而不单击“检查名称”按钮,而只是单击“确定”,您会收到一条错误消息,指出: 参数loginName 不能为空或大于251 个字符。
因此,在实现 SPClaimProvider 时,有 2 个 FillResolve 方法,一种接受字符串,另一种接受 SPClaim。接受 SPClaim 的人永远不会被呼叫。 如果我理解正确的话,我相信这是根据 SharePoint 中的声明应用安全性的最终解决方案。
我已尝试在不提供代码的情况下尽可能详细地说明,但请让我知道您需要了解的任何信息以帮助解决此问题。
提前致谢, 斯科特
All,
I've recently tried to implement a custom claims provider inside SharePoint 2010. The claims get populated with some business logic from a database.
The claims appear to be making it on to the users. Which is a good first step.
The next step was to check to see if the people picker worked.
The PeoplePicker can search and resolve the name if you click the "Check Names" button. HOWEVER...
If you go into the PeoplePicker, and click Browse, then search for your claim, and select it and add it to the "Add" box, then click OK. Nothing happens, nothing is added to the Grant Permissions box.
Alternatively, if you just type in a claim and click the "check names" button, it will resolve it fine, but if you click OK, it blanks out the field and says its required.
Alternatively again, if you type in the claim and NOT click the "check names" button and just click "OK", you get an error message stating:
The parameter loginName cannot be empty or bigger than 251 characters.
So in implementing the SPClaimProvider, there are 2 FillResolve methods, one that accepts a string, and one that accepts an SPClaim. The one that accepts an SPClaim NEVER gets called, ever.
Which I believe, if I understand right, is the one that does the final resolving to apply the security based off the claim in SharePoint.
I've tried to be as detailed as possible without providing code, but please let me know whatever you need to know to help resolve this issue.
Thanks In Advance,
Scott
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这是一个老问题,但我遇到它并认为我可以帮助下一个人。我通常会看到这种效果“单击确定”,当我在 SPClaimProvider 中拥有不在可信身份提供商 (TIP) 中的声明时,该效果就会消失。对于从安全令牌服务链接到 SharePoint 系统的声明,它必须位于 TIP 中。如果不是,SharePoint 就会丢弃它。
希望对某人有帮助。
I know this is an old question, but I came across it and thought I could help the next person. I usually see this effect "Click OK" and it goes away when I have an claim in the SPClaimProvider that is not in the Trusted Identity Provider (TIP). For a claim to be chained from the Secure Token Service to the SharePoint system, it must be in the TIP. If not SharePoint just discards it.
Hope that helps someone.