Scenario:
If you are writing a master page or a content page, you might have a requirement to display a section depending upon the user permissions.
Solution:
SPSecurityTrimmedControl is your best friend.
Code:
<SharePoint:SPSecurityTrimmedControl PermissionsString="AddAndCustomizePages, ManageLists" runat="server">Article:
You can see me because you have Manage List and Customize Pages permission
</SharePoint:SPSecurityTrimmedControl>
Other posssible permission strings
0 comments:
Post a Comment