Sharepoint ListItem-权限
我正在开发一个 sharepoint 2010 应用程序。这些应用程序的一部分是项目列表。
ListColumns:标题、Owner1、Owner2
用户应该能够创建 ListItem 并设置项目所有者(Owner1、Owner2)。创建项目后,只有所有者和管理员才能更改它。
我的想法:
使用一个事件接收器,在创建新项目并为 Owner1 和 Owner2 设置新权限后删除该新项目的所有权限(我预期的问题:我正在 Sandboxsolution 中工作,并且我认为我无法在其中设置权限)
创建一个每天执行 powershell 的timejob。 powershell将删除并创建权限(问题:我认为脚本需要高权限,如果每天只运行一次则不准确)
我的问题是:有人有想法吗如何解决问题或者如果有不同的解决方案如何解决这个问题?
多谢!!!
I'm developing a sharepoint 2010 application. One Part of these application is a List of items.
ListCollumns: Title, Owner1, Owner2
The user should be able to create ListItems and to set the items owners (Owner1, Owner2). After creating the item, only the owners and the Administrators should be able to change it.
My ideas:
working with a event receiver that deletes all permissions on the new item after creating it and setting new permissions to Owner1 and Owner2 (Problems I expect: I'm working in a Sandboxsolution and I think I can't set permissions in it)
Creating a timejob which execute a powershell everyday. The powershell will delete and create the permissions (Problem: I think the script needs high permissions and it isn't exact if it just run one time per day)
my question is: does any one have an idea how to solve the problems or if there are different solutions how to solve this problem?
Thanks a lot!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我之前已经使用事件接收器完成了您所描述的几次。效果很好。每次,事件接收器都是场解决方案的一部分。但它应该在沙盒解决方案中工作,因为您需要的所有内容都被标记为“在沙盒解决方案中可用:是”
I have done what you describe using an Event Receiver a couple times before. It worked great. Each time, the Event Receiver was part of a farm solution. But it should work in a sandbox solution as everything you need is marked as "Available in Sandboxed Solutions: Yes"
将 SharePoint Designer 与 SPD 活动自定义操作结合使用,您可以通过创建项目后触发的工作流设置权限:链接
Using SharePoint Designer with SPD Activities custom actions, you can set the permissions with a workflow that fires after the item is created: Link