How to hide elements from anonymous users in SharePoint 2013

Sometimes we need to hide some elements of the page from anonymous users.

To achieve that you just need to insert this:

<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AuthenticatedUsersOnly" EmitDiv="true">
   HTML to hide from anonymous users

Note: The PermissionsString attribute defines the permissions the user must have in order to view the content. See SPBasePermissions enumeration for a listing of possible values.

Have more questions? Submit a request


Powered by Zendesk