Sometimes it is necessary to judge the user's permission point in the custom development through the Sharepointdesigner, and to judge the user's identity according to the different permission points to provide different service, have a control Spsecuritytrimmedcontrol by default to provide the recognition rights, This control is especially useful if you want to have different behavior based on different permissions when you make a site order through Sharepointdesigner.
In the following example, depending on the permissions to set the different values of the script variable, please note that the permission string is the relationship, that is, the permissions will be superimposed.
<script>
var msg = 0;
var canbook = 0;
</script>
<sharepoint:spsecuritytrimmedcontrol runat= "Server" permissionsstring= " Addandcustomizepages, managelists ">
<script>
canbook = 1;
</script>
</Sharepoint:SPSecurityTrimmedControl>
Attached to all permissionstring:
List Permissions
Managelists
Cancelcheckout
Addlistitems
Editlistitems
Deletelistitems
ViewListItems
Approveitems
Openitems
Viewversions
Deleteversions
Createalerts
Viewformpages
Site Permissions
Managepermissions
Viewusagedata
ManageSubwebs
ManageWeb
Addandcustomizepages
Applythemeandborder
Applystylesheets
Creategroups
Browsedirectories
Createsscsite
Viewpages
Enumeratepermissions
Browseuserinfo
Managealerts
Useremoteapis
Useclientintegration
Open
Editmyuserinfo
Personal Permissions
Managepersonalviews
Adddelprivatewebparts
Updatepersonalwebparts
Author: cnblogs Johnsonwang
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/