http://www.wssdemo.com/Blog/archive/2010/01/15/SharePoint-2010-Permissions.aspx
There are several places where you can use the built in SharePoint permissions (apart from Code and Site Permission administration. I have blogged about the SPSecurityTrimmedControl and ddwrt:IfHasRights uses in 2007 but there is the new ribbon custom commands in 2010 that also make use of the SharePoint permissions. So here is an overview of how you can use these permissions in the following scenarios followed by a complete list of the permission values.
Ribbon Custom Actions
You can add these to any list or library using SharePoint Designer from the List summary page
The properties of the action allow you to specify the Rights Mask to control visibility of the action.
SPSecurityTrimmedControl Class
Conditionally renders the contents of the control to the current user only if the current user has permissions defined in the PermissionString. You can use this in your master, page layouts or web part pages.
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="" ></SharePoint:SPSecurityTrimmedControl>
Ddwrt xsl namespace
You can use this in the Data View web part or any other web part that is derived from this (e.g. search or content query).
<xsl:if
test="ddwrt:IfHasRights(permissionMask)">
something...
</xsl:if>
SharePoint designer also makes this function available in the xpath expression builder dialog.
List of permissions and mask values:
|
List/document perms |
Mask |
|
ViewListItems |
1 |
|
AddListItems |
2 |
|
EditListItems |
4 |
|
DeleteListItems |
8 |
|
ApproveItems |
16 |
|
OpenItems |
32 |
|
ViewVersions |
64 |
|
DeleteVersions |
128 |
|
CancelCheckout |
256 |
|
ManagePersonalViews |
512 |
|
ManageLists |
2,048 |
|
ViewFormPages |
4,096 |
|
Web level perms | |
|
Open |
65,536 |
|
ViewPages |
131,072 |
|
AddAndCustomizePages |
262,144 |
|
ApplyThemeAndBorder |
524,288 |
|
ApplyStyleSheets |
1,048,576 |
|
ViewUsageData |
2,097,152 |
|
CreateSSCSite |
4,194,314 |
|
ManageSubwebs |
8,388,608 |
|
CreateGroups |
16,777,216 |
|
ManagePermissions |
33,554,432 |
|
BrowseDirectories |
67,108,864 |
|
BrowseUserInfo |
134,217,728 |
|
AddDelPrivateWebParts |
268,435,456 |
|
UpdatePersonalWebParts |
536,870,912 |
|
ManageWeb |
1,073,741,824 |
|
UseRemoteAPIs |
137,438,953,472 |
|
ManageAlerts |
274,877,906,944 |
|
CreateAlerts |
549,755,813,888 |
|
EditMyUserInfo |
1,099,511,627,776 |
|
special perms | |
|
EnumeratePermissions |
4,611,686,018,427,380,000 |
SharePoint权限
本文介绍了SharePoint 2010中内置权限的应用场景,包括Ribbon自定义操作、SPSecurityTrimmedControl类及ddwrt:xsl命名空间的使用。同时提供了权限列表及其对应的掩码值。
137

被折叠的 条评论
为什么被折叠?



