CustomAction 未出现在不继承权限的 SPList 的 ListView Web 部件中

发布于 2024-07-14 23:00:12 字数 980 浏览 7 评论 0原文

我创建了一个 SharePoint 文档库,并将其设置为不继承来自 Web 的权限。 我已经配置了一个 ListView Web 部件来显示文档库的内容,并且它工作正常。

我创建了一个具有文档库贡献权限的用户,但只能阅读网站的其余部分。

我创建了一个自定义操作,并将 Rights 属性设置为“AddListItems”。

当我以用户身份登录时,我会看到 SharePoint 中现成的标准上传和多重上传选项,但看不到我的自定义操作“我的上传”。

当我使用“站点成员”组中的用户登录时,我会在“上传”菜单中看到我的选择。

我在这里缺少什么? 它的行为就好像“AddListItems”权限与网站而不是列表相关联,但默认上传的行为正如我所期望的!

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Document Library Toolbar Upload Menu Dropdown -->
  <CustomAction Id="myUploadOption"
    GroupId="UploadMenu"
    ImageUrl="/_layouts/Images/myUploadIcon.jpg"
    Location="Microsoft.SharePoint.StandardMenu"
    Sequence="1000"
    Title="My Upload"
    Rights="AddListItems"
    Description="Assign permissions and meta data values while uploading multiple documents">
    <UrlAction Url="/_layouts/FileUploaderApp/MyFileUpload.aspx"/>
  </CustomAction>
</Elements>

I have a SharePoint document library created and it is set to not inherit permissions from the web. I've configured a ListView webpart to display the contents of the document library and it works fine.

I created a user that has the Contribute permission to the document library, but can only read the rest of the site.

I created a custom action with the Rights attribute set to "AddListItems".

When I log in as the user, I see the standard Upload and Multiple Upload options that are out of the box SharePoint, but I do not see my custom action, My Upload.

When I log in with a user that is in the Site Members group, I see my choice in the Upload menu.

What am I missing here? It's behaving as if the "AddListItems" permission is associated with the site and not the list, but the default uploads are acting as I would expect!

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Document Library Toolbar Upload Menu Dropdown -->
  <CustomAction Id="myUploadOption"
    GroupId="UploadMenu"
    ImageUrl="/_layouts/Images/myUploadIcon.jpg"
    Location="Microsoft.SharePoint.StandardMenu"
    Sequence="1000"
    Title="My Upload"
    Rights="AddListItems"
    Description="Assign permissions and meta data values while uploading multiple documents">
    <UrlAction Url="/_layouts/FileUploaderApp/MyFileUpload.aspx"/>
  </CustomAction>
</Elements>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

波浪屿的海角声 2024-07-21 23:00:12

我始终无法按照我的问题中的描述进行此操作。

为了解决我的问题,我为菜单项(“我的上传”)创建了一个自定义控件,该控件使用文档库的权限进行安全检查。

I was never able to get this working as described in my question.

To solve my problem, I instead created a custom control for the menu item ("My Upload") and the control does the security check using the permissions on the document library.

美煞众生 2024-07-21 23:00:12

如果删除权限属性会发生什么? 上传菜单是否因自身权限而隐藏,或者由于您的自定义操作存在而可见?

What happen if you remove the rights attribute? Is the Upload menu hidden by its own permission, or is it visible since your custom action exists?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文