在自定义Web部件中使用AssetURLSelector [英] Using AssetURLSelector in custom web part
问题描述
我在自定义Web部件中有一个asseturlselector.每当用户单击浏览按钮时,身份验证窗口就会不断弹出.我已经在整个网站上设置了允许匿名用户的权限.
Hi, i have a asseturlselector in my custom web part. whenever the user click on the browse button, the authentication window keep popping up. I have already set permission for allow Anonymous User on Entire Web Site.
我的要求是
- 匿名用户可以在浏览器中单击以选择他有权访问的共享点中的资产,而无需登录共享点.
- 不允许匿名用户上传任何内容.
- 他应该只能选择pdf文件或图像. < =如果可以的话这是可选的
- 隐藏对话框的左侧导航菜单,因此用户只能从默认位置选择项目
- annoymous user is able to click on the browse to select an asset in sharepoint that he have access to without signing into Sharepoint.
- the annoymous user will not be allow to upload anything.
- he should only be able to select pdf files or images. <= this is optional if able to do it will be good
- hiding the left nav menu of the dialog box, so user can only choose item from the default location
以下是我对资产选择器的标记
the following is my markup for the asset selector
<%@Register TagPrefix="CMS" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.Publishing.WebControls"%>
<CMS:AssetUrlSelector ID="assetAttachment" runat="server" DefaultOpenLocationUrl="/PublishingImages/" DisplayLookInSection="false"
CssTextBox="form-control" DefaultToLastUsedLocation="false" />
推荐答案
Tweety-登录提示可能有很多原因.有关详细信息,请参见以下链接.
Hi Tweety-there could be many reasons for the login prompt. See the following links for details.
确保该网站对他们来说是只读的,因此他们不能上载/编辑任何内容.
Make sure the site is read only for them so they can't upload/edit anything.
您可以使用CSS隐藏左侧导航栏(请参阅第二个链接).
You can hide the left nav using css (see 2nd link).
https://www.brightwork.com/博客/轻松隐藏共享点快速启动-2013#.WpAn8aqWxhE
这篇关于在自定义Web部件中使用AssetURLSelector的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!