How to add custom actions to sharepoint that are visible only to a specific group

I want to create a custom action in C # code for a sharepoint list.

I use the SPUserCustomAction type, and I need to display this element only for certain users (the user is represented in a specific group)

The location is set to "Microsoft.SharePoint.StandardMenu";

How can I indicate in the code that only a few users belonging to my group can see this menu item? Any links?

Thanks.

+4
source share
1 answer

Rights attribute is your friend. Here you can set what rights are required for your user actions to be displayed as follows:

 Rights = "ViewListItems" 

The rights are based on the SPBasePermission enumeration, which you can find here .

Also see this blog post about protecting user actions .

+4
source

Source: https://habr.com/ru/post/1437670/


All Articles