关闭

Sharepoint 2010 Permissions[自定义动作的权限设置]

标签: sharepointpermissions2010xsllistproperties
1208人阅读 评论(0) 收藏 举报
分类:

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

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:30395次
    • 积分:423
    • 等级:
    • 排名:千里之外
    • 原创:9篇
    • 转载:14篇
    • 译文:0篇
    • 评论:1条