<xsl:if test="ddwrt:IfHasRights('2')">
<div>
<img src="/_layouts/images/caladd.gif"
alt=""/> <a><xsl:attribute
name="onclick">javascript:NewItem2(event,
"/_layouts/listform.aspx?PageType=8&ListId={}&RootFolder=");javascript:return
false;</xsl:attribute> <xsl:attribute
name="href">/_layouts/listform.aspx?PageType=8&ListId={}&RootFolder=</xsl:attribute>Add
new announcement</a>
</div>
</xsl:if>
From C:\Program Files\Microsoft Office\Office14\CAML2XSL.XSL:
<!-- keep in sync with global.cs!!!
EmptyMask =0x0000000000000000,
// list/document perms =0x000000000000XXXX,
ViewListItems =0x0000000000000001,
AddListItems =0x0000000000000002,
EditListItems =0x0000000000000004,
DeleteListItems =0x0000000000000008,
ApproveItems =0x0000000000000010,
OpenItems =0x0000000000000020,
ViewVersions =0x0000000000000040,
DeleteVersions =0x0000000000000080,
CancelCheckout =0x0000000000000100,
ManagePersonalViews =0x0000000000000200,
// UnusedList10 =0x0000000000000400, /* obsolete ManageListPermission */
ManageLists =0x0000000000000800,
ViewFormPages =0x0000000000001000,
// UnusedList20 =0x0000000000002000,
// UnusedList40 =0x0000000000004000,
// UnusedList80 =0x0000000000008000,
// web level perms =0x0000XXXXXXXX0000,
Open =0x0000000000010000,
ViewPages =0x0000000000020000,
AddAndCustomizePages =0x0000000000040000,
ApplyThemeAndBorder =0x0000000000080000,
ApplyStyleSheets =0x0000000000100000,
ViewUsageData =0x0000000000200000,
CreateSSCSite =0x0000000000400000,
ManageSubwebs =0x0000000000800000,
CreateGroups =0x0000000001000000,
ManagePermissions =0x0000000002000000,
BrowseDirectories =0x0000000004000000,
BrowseUserInfo =0x0000000008000000,
AddDelPrivateWebParts =0x0000000010000000,
UpdatePersonalWebParts =0x0000000020000000,
ManageWeb =0x0000000040000000,
UseRemoteAPIs =0x0000002000000000,
ManageAlerts =0x0000004000000000,
CreateAlerts =0x0000008000000000,
EditMyUserInfo =0x0000010000000000,
// special perms =0xXXXX000000000000,
EnumeratePermissions =0x4000000000000000,
// end of list
FullMask =0x7FFFFFFFFFFFFFFF,
-->
Resources:
http://sharepoint.indigoreality.com/2012/05/04/sharepoint-2010-ifhasrightspermissionmask/
SPBasePermissions enumeration
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment