I am working in Sharepoint 2010, I have a button in a content editor webpart on a page. I have set up two groups each with custom permission levels. Is it possible to security trim the webpart so that it only displays for people in the first group and not in the second group? Can I use security trimming with custom permission levels, or do I have to use OOTB levels? Any suggestions or tips for how best to accomplish this are appreciated.
You can use Audience Targeting to show and hide web parts based on
- rules-based audiences(Global Audience),
- SharePoint groups, and
- distribution-list memberships
Note: this is not the same as security trimming, however, it may server your requirement. Check this tutorial on how to do it step by step