【发布时间】:2010-11-08 22:30:36
【问题描述】:
我编写了一个功能(站点范围),将自定义菜单项添加到 SharePoint 2007 文档库的新菜单和 EditControlBlock。仅当用户对该文档库具有添加和编辑权限时,才应显示这些菜单项。这很好用,除了用户只有父站点的读取权限但对文档库具有完全控制权的特殊情况。在这种情况下,EditControlBlock 下的菜单项正确显示,但新菜单下的菜单项不显示。我为所有菜单项设置了相同的权限。以下是 Feature 和 Element 清单文件中的示例条目
<?xml version="1.0" encoding="utf-8" ?>
<Feature
Id="59bba8e7-0cfc-46e3-9285-4597f8085e76"
Title="My Custom Menus"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="Elements.xml" />
</ElementManifests>
</Feature>
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="EditMenu1" RegistrationType="FileType" RegistrationId="txt" Location="EditControlBlock" Sequence="106" ImageUrl="/_layouts/images/PPT16.GIF" Title="My Edit Menu" Rights="AddListItems,EditListItems">
<UrlAction Url="javascript:var surl='{SiteUrl}'; window.location='/test/mypage.aspx?siteurl='+surl+'&itemurl={ItemUrl}&itemid={ItemId}&listid={ListId}&Source='+window.location" />
</CustomAction>
<CustomAction Id="NewMenu1" GroupId="NewMenu" RegistrationType="List" RegistrationId="101" Location="Microsoft.SharePoint.StandardMenu" Sequence="1002" ImageUrl ="/_layouts/images/DOC32.GIF" Title="My New Menu" Rights="AddListItems,EditListItems">
<UrlAction Url="javascript:var surl='{SiteUrl}'; window.location='/test/mypage.aspx?siteurl='+surl+'&listid={ListId}&Source='+window.location" />
</CustomAction>
</Elements>
我错过了什么吗?请指教。
问候, 贾格纳特
【问题讨论】:
-
有趣的问题,我只是想找出原因,如果我得到什么,请告诉你。
标签: sharepoint sharepoint-2007 menu