How do I make open “read only” the only option within a SharePoint document library?
如何将“只读”打开为SharePoint文档库中的唯一选项?
When using either Word 2003 or 2007 and saving the document as a template or modifying the file properties as “read only” doesn’t prevent modification of the file in a SharePoint document library. Modifying the document library permissions to only allow “read only” access doesn’t work either. What works is to use a SharePoint URL link list to access the files within an external server directory, but that defeats the use of a SharePoint document library.
使用Word 2003或2007并将文档另存为模板或将文件属性修改为“只读”时,不会阻止修改SharePoint文档库中的文件。将文档库权限修改为仅允许“只读”访问也不起作用。有效的方法是使用SharePoint URL链接列表来访问外部服务器目录中的文件,但这会使得无法使用SharePoint文档库。
2 个解决方案
#1
2
I don't know if you can force read only to be the only option, but you can implement your own event handler to override the ItemUpdating event. Just cancel the update and any changes will be discarded.
我不知道你是否可以强制只读是唯一的选项,但你可以实现自己的事件处理程序来覆盖ItemUpdating事件。只需取消更新,任何更改都将被丢弃。
Sahil shows a very basic event handler that performs the cancel here.
Sahil显示了一个非常基本的事件处理程序,它在此处执行取消。
#2
1
The event handler works, but I have found a simpler workaround.
事件处理程序有效,但我找到了一个更简单的解决方法。
If you “Check Out” the file and leave it checked out, no one else has the option to edit the file. This is still not ideal, but for forcing a document to be “read only” it works.
如果您“签出”文件并将其签出,则没有其他人可以选择编辑该文件。这仍然不理想,但是为了强制文档“只读”它可以工作。
#1
2
I don't know if you can force read only to be the only option, but you can implement your own event handler to override the ItemUpdating event. Just cancel the update and any changes will be discarded.
我不知道你是否可以强制只读是唯一的选项,但你可以实现自己的事件处理程序来覆盖ItemUpdating事件。只需取消更新,任何更改都将被丢弃。
Sahil shows a very basic event handler that performs the cancel here.
Sahil显示了一个非常基本的事件处理程序,它在此处执行取消。
#2
1
The event handler works, but I have found a simpler workaround.
事件处理程序有效,但我找到了一个更简单的解决方法。
If you “Check Out” the file and leave it checked out, no one else has the option to edit the file. This is still not ideal, but for forcing a document to be “read only” it works.
如果您“签出”文件并将其签出,则没有其他人可以选择编辑该文件。这仍然不理想,但是为了强制文档“只读”它可以工作。