I am trying to understand SPSecurityTrimmedControl. I want to make use of it in Master page to hide Site action (the gear icon) from all readonly users.

I found there is a parameter "PermissionContext". But I could not find any example using it. Following are the Permission Context values:

  • Current Folder
  • Current Item
  • Current List
  • Current Site
  • Root Site

In SharePoint, the user is always reading single page. When you open a new page, the control will be rendered again according to that page's settings. What is the use for specific the PermissionContext?

1 Answer 1


Security trim snippet used to display content to specific people as per the permissions of the user whether users having permissions or not. We can add this security snippet to SharePoint master page or page layout. Security trim panel may contain other objects like webparts, components or static content.

You can check this links,

  1. remove-access-to-site-settings-from-cog-menu
  2. permissioncontext

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.