Problem: adding feature in MOSS 2007
- by Anoop
Hi All,
I have added a menu item in 'Actions' menu of a document library as follows(Using features: explained in MSDN How to: Add Actions to the User Interface: http://msdn.microsoft.com/en-us/library/ms473643.aspx):
feature.xml as follows:
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="51DEF381-F853-4991-B8DC-EBFB485BACDA"
Title="Import From REP"
Description="This example shows how you can customize various areas inside Windows SharePoint Services."
Version="1.0.0.0"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="ImportFromREP.xml" />
</ElementManifests>
</Feature>
ImportFromREP.xml is as follows:
<?xml version="1.0" encoding="utf-8"?>
<Elements
xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Document Library Toolbar Actions Menu Dropdown -->
<CustomAction Id="ImportFromREP"
RegistrationType="List"
RegistrationId = "101"
GroupId="ActionsMenu"
Rights="AddListItems"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Import From REP">
<UrlAction Url="/_layouts/ImportFromREP.aspx?ActionsMenu"/>
</CustomAction>
</Elements>
I have successfully installed and activated the feature.
Normal case:
Now if i login with the user having atleast 'Contribute' permission on the document library, i am able to see the menu item 'Import From REP' (in 'Actions' menu)in root folder as well as in all subfolders.
Problem case:
If user is having view rights on the document library but add/delete rights on a perticular subfolder(say 'subfolder') inside the document library:
Menu item 'Import From REP' is not visible on root folder level as well as 'Upload' menu is also not visible. which is o.k. because user does not have AddListItems right on root folder
but it is also not visible in 'subfolder' while 'Upload' menu is visible as user has add/delete rights on the 'subfolder'.
did i mention a wrong value of attribute Rights(Rights="AddListItems") in the xml file?? If so, what should be the correct value?
What should i do to simulate the behaviour of 'Upload' menu??(i.e. when 'Upload' menu is visible, 'Import From REP' menu is visible and when 'Upload' menu is not visible 'Import From REP' menu is also not visible. )
Thanks in advance
Anoop