开发者

Custom Action and Group

I'm creating a link and put it in the site action container. The link should only be visible to members in the HR groups. Here is the declaration in my Elements.xml file

<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
    <CustomAction Rights="ManageWeb" Id="UM" 
       Description="View and manage user profile"   
       Title="User Management" GroupId="SiteActions"  
       Location="Microsoft.SharePoint.StandardMenu" Sequence="10">
       <UrlAction Url="~site/_layouts/UM/Overview.aspx"  />   
    </CustomAction>
    <HideCustomAction HideActionId="UM" GroupId="SiteActions"  
       Location="Microsoft.SharePoint.StandardMenu" Id="hideUM"  >    
    </HideCustomAction>

My problems is how do I connect this two, between the link and the group. Any help is very much a开发者_如何学Cppreciated. Thanks in advance.


I think the HideCustomAction element is intended to just make an existing CustomAction hidden, whithout any conditions. Which means that your HideCustomAction element (hideUM) will just hide the CustomAction element (UM) above. You could control your CustomAction by creating a custom control (ControlAssembly and ControlClass attributes) and implement the visibility logic there.


I asked this question about a year ago. At that time I was very new to SharePoint.Now I know, to control a custom action visibility is to use the Rights attribute. To connect the link and the group, set the group permission to have Manage Webs permission level

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜