我可以限制查看受控文档库中的某些文档吗?
我们的共享点控制文档库中有大约 2000 个文件,每个人都可以查看。我想限制某些文档的查看,并使其仅可供特定用户组查看。我知道可以通过将这些文档移动到另一个库并使用文档库权限来完成,但我更喜欢通过使用文档属性来识别它们以编程方式执行此操作 是否可以以编程方式拒绝访问受控文档库中的某些文档?
We have around 2000 files in our sharepoint controlled document library, which are viewable by everyone. I would like to restrict viewing of some of the documents and make them viewable for only a specific group of users. I am aware that it can be done by moving those documents to another library and using document library permission, but I prefer to do it programatically by using a document property to identify them
Is it possible to programatically deny access to some documents inside the controlled documents library?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实现此目的的一个好方法是实现一个 HTTP 模块,该模块为与您要阻止的文档匹配的 URL 返回 401。用户仍然能够在列表视图中查看所有文档(例如 allitems.aspx)以及查看/编辑项目上的相关元数据 - 以及他们无权访问的那些文档。
作为 SharePoint 替代方案,您还可以在文档库中设置项目特定权限 - 无需将其拆分为文件夹或多个文档库。这当然意味着您可以将特定用户或组分配给项目。
Kr.,伯恩德。
An ok approach to achieve this could be to implement an HTTP module that returns a 401 for the URLs matching the documents you want to block. Users will still be able to see all documents in the list view (allitems.aspx for instance) and the associated metadata on view/edit item - also those documents they do not have access to.
As SharePoint alternative you could also set item specific permissions in the document library - without splitting it up into folders or multiple document libraries. That of course implies that you can use assign specific users or groups to the items.
Kr., Bernd.