通过过滤当前用户来保护外部列表
我设置了一个外部内容类型,其中包含一个包含 Active Directory 帐户的列,用于将每条记录映射到用户。现在,我希望用户只能看到列表中 AD 帐户条目与当前用户的凭据匹配的记录。
所以我尝试了以下 方法,并成功在 ReadItem/create/update/delete 操作上创建用户上下文过滤器。但是,在 ReadList 操作上没有选项,向导有不同的过滤器选项。
结果是当前用户可以看到外部列表中的所有项目,但只能打开那些用他的帐户标记的项目,因此过滤器肯定有效。然而,仅对项目而不是整个列表进行过滤是没有用的(无法打开的项目会让用户感到困惑,列表视图可能会暴露数据等)。
我尝试使用当前用户 Web 部件过滤此列表,这为我们提供了所需的结果,但列表本身当然仍然位于后台,可以通过 URL 打开。
如何将用户上下文过滤器应用于 ReadList?如果这是不可能的,那么在哪里以及如何实现这样的过滤器?
I have set up an external content type with a column that contains Active Directory accounts to map each record to a user. Now I want users to only see those records in the list where the AD-account entry matches the current user's credentials.
So I tried the following approach, and succeeded in creating a user context filter on the ReadItem/create/update/delete operations. However, on the ReadList operation there is no option for it, the wizard has different filter options.
The result is that the current user can see all items in the external list, but can only open those tagged with his account, so the filter definitely works. However having the filter only on items and not on the whole list is useless (items that cannot be opened will confuse the user, a list view might expose the data anyway etc.).
I tried to filter this list with the Current User webpart, which gives us the desired result, but the list itself is of course still sitting in the background and can be opened via URL.
How can I get the user context filter applied on ReadList? And if that is not possible, where and how do you implement such a filter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 SharePoint Designer 导出 BDC 元数据模型并手动编辑它以包含 UserContext 筛选器。然后通过管理中心的 BDC 服务应用程序重新导入模型。
Export the BDC Metadata Model from SharePoint Designer and edit it by hand to include the UserContext filter. Then reimport the model through the BDC Service Application in Central Administration.