显示SharePoint托管应用程序中的用户 [英] Display Users with Presence in a SharePoint Hosted App

查看:72
本文介绍了显示SharePoint托管应用程序中的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图在我的应用中显示存在状态的用户。我的目标是显示这样的用户:

I'm stuck trying to display users in my App with a presence status. My goal is to display a user like this:

深入研究渲染模板我找到了一种以这种方式渲染用户的方法:

Digging into the Rendering Templates I found a method to render a user in this way:

EnsureScriptFunc("clienttemplates.js", "RenderUserFieldWorker", function () {
            ULS2Vv:;

var renderCtx = new ContextInfo();
renderCtx.Templates = {};
renderCtx.Templates [" Fields"] = {};
var fieldSchemaData = {" PictureOnly":" 1"," PictureSize":" ; size_72px"};
var listSchema = {" EffectivePresenceEnabled":" 1"," PresenceAlt":" User Presence"};
var userData = {" title":" Cas van Iersel"," email":" cas@rapidcircle.com"," picture":" http:// urltopicture"," sip":" cas@rapidcircle.c OM" };
var userHtml = RenderUserFieldWorker(renderCtx,fieldSchemaData,userData,listSchema);

var renderCtx = new ContextInfo(); renderCtx.Templates = {}; renderCtx.Templates["Fields"] = {}; var fieldSchemaData = { "PictureOnly": "1", "PictureSize": "Size_72px" }; var listSchema = { "EffectivePresenceEnabled": "1", "PresenceAlt": "User Presence" }; var userData = { "title": "Cas van Iersel", "email": "cas@rapidcircle.com", "picture": "http://urltopicture", "sip": "cas@rapidcircle.com" }; var userHtml = RenderUserFieldWorker(renderCtx, fieldSchemaData, userData, listSchema);

ProcessImn();

ProcessImn();

});

ProcessImn()方法更新用户的Lync状态。将userHtml放在页面上时,用户看起来就像这篇文章中的图片一样。当悬停一个漂亮的Flyout时会出现一些Lync函数。但是,如果我在应用程序中运行此代码,则图片
显示但是状态状态未更新。当将鼠标悬停在图片上时,我获得了"权限被拒绝" JavaScript中的异常。

The ProcessImn() method updates the Lync status for a user. When putting the userHtml on the page the users look like the picture in this post. When hovering a nice Flyout appears with some Lync functions. However if I run this code in an App, the picture shows but the Presence status is not updated. When hovering over the Picture I get a "Permission Denied" exception in the JavaScript.

 应用程序权限是:UserProfiles(FullControl),搜索(QueryAsUserIgnorePrinciples),Web(读取)

 App Permissions are: UserProfiles (FullControl), Search (QueryAsUserIgnorePrinciples), Web (Read)

我试图更改一些应用程序权限但没有成功。  

I tried to change some of the App Permissions but no success there. 

有什么想法吗?

推荐答案

IMNControl是activex控件,它可能是与IE安全区域的设置相关。

IMNControl is activex control, it may be related with the setting for the IE security zone.

状态控件是否适用于任何其他sharepoint Web应用程序?如果可行,请尝试将SharePoint托管应用程序添加到与工作Web应用程序相同的IE安全区域中。

does the presence control works on any other sharepoint web application? if it works, try add your SharePoint hosted app into the same IE security zone as the work web application.


这篇关于显示SharePoint托管应用程序中的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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