Reputation: 4443
I want to create custom action in c# code for sharepoint list.
I am using SPUserCustomAction type and i need to display this item only for specific users (user are presented in specific group)
Location set to "Microsoft.SharePoint.StandardMenu";
How can I specify in code that only few users that belongs to my custom group can see this menu item? Any links?
Thanks.
Upvotes: 4
Views: 8477
Reputation: 21788
The Rights
Attribute is your friend. Here you can set which rights are required for your custom action to be shown like so:
Rights = "ViewListItems"
The rights are based on the SPBasePermission
enumeration which you can find here.
Also see this blog post about security trimming custom actions.
Upvotes: 4