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

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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值