views:

884

answers:

2

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/"&gt;
  <!-- 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>
A: 

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?

JMD
If I remove the Rights attribute, my custom action appears for everyone, regardless of their permissions.
kdjones74
+2  A: 

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.

kdjones74