是否可以在低信任提供商托管应用程序中使用List SPItemEventReceiver? [英] Is it possible to have for a List SPItemEventReceiver in a Low Trust Provider Hosted App?

查看:57
本文介绍了是否可以在低信任提供商托管应用程序中使用List SPItemEventReceiver?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个以低信任模式运行的提供商托管应用程序。我有两个列表(一个用于主要项目,另一个用作已删除项目的存档)。我想知道是否以及如何在完全信任解决方案中使用列表和SPItemEventReceiver
,这可以在应用上下文中添加或删除。


例如:


用户删除列表中的项目,通常他对归档列表没有贡献权限。我想在具有更高权限的应用程序上下文中执行代码,并将项目从一个列表复制到另一个列表。成功复制后,在
一侧删除它。


- 通常可以在提供商托管应用程序中以低信任模式运行这样的SPItemEventReceiver


- 如果是,从哪里开始


- 是否也可以在具有更高权限的应用程序上下文中执行代码?



最好的问候


沼泽




最好的问候BOG

解决方案


你想要的是
远程事件接收器 ,您可以查看以下链接了解更多详情。


https://msdn.microsoft.com/en-us/library/office/jj220043.aspx


您可以将加载项设置为使用加载项策略,对于加载项请求,SharePoint要求加载项具有对资源的权限,但无论用户是否执行操作都与
无关。(SharePoint加载项只有在获得权限的情况下才能生成加载项请求提前;通常,安装时。)


您可以查看以下链接了解更多详情。


https://msdn.microsoft.com/en-us/library/office/fp142384.aspx


最好的问候,



Hi,

i have a Provider Hosted App which runs in Low Trust Mode. I have two lists (one for the main items and another one as archive for deleted items). I want to know if and how it is possible to have like in full trust solutions a list a SPItemEventReceiver which can do something on adding or deleting in app context. 

For example:

A user deletes an item in the list and normally he has no contribute permissions on the archive list. I want to execute the code in apps context with higher privileges and copy the item from one to another list. After successfull copying delete it on one side.

- Is it generally possible to have such an SPItemEventReceiver within an Provider Hosted App which runs in Low Trust Mode

- and if yes, where to start

- Is it also possible to execute code in apps context with higher privileges?

best regards

Bog


Best regards BOG

解决方案

Hi,

What you want is remote event receiver, you could check below link for more details.

https://msdn.microsoft.com/en-us/library/office/jj220043.aspx

You could set your add-in to use add-in-only policy, in the case of an add-in-only request, SharePoint requires that the add-in have permission to the resource, but it does not matter whether the user does or not. (a SharePoint Add-in can make add-in-only requests only if it has been given permission to do so in advance; typically, when it is installed.)

You could check below link for more details.

https://msdn.microsoft.com/en-us/library/office/fp142384.aspx

Best Regards,

Lee


这篇关于是否可以在低信任提供商托管应用程序中使用List SPItemEventReceiver?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆