views:

180

answers:

1

I have created a custom action for items in a list (custom printing of the item). I have defined a new SharePoint group called 'Print Users'. I want to restrict the availability of the printing custom action to only members of the 'Print Users' group.

I haven't been able to find an attribute in either the feature.xml or element.xml files (where the custom print action is defined) that would allow me to filter the visibility to a group. Is that the wrong place to look? Can this even be done, or do I have to write code in Print.aspx (the target of the custom action) to check for group membership and then render a 'Sorry you don't have permissions' message instead of the real printing page?

A: 

I am afraid that you can only use the SPBasePermission to restrict the display of the custom action. It cannot be done with the custom group you create. Please refer to this link on how to create a custom action. Example

And this Link will give you more information on how the security works MSDN Rights is the attribute you need to check

Kusek

related questions