SPPermission class
Used to test whether the current user has a requested set of permissions.
Remarks
Specifies the built-in permissions available in SharePoint Foundation
For more information, see: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx
Constructors
(constructor)(value) | Constructs a new instance of the |
Properties
add |
Add, change, or delete HTML pages or web part Pages, and edit the Web site using a SharePoint Foundation-compatible editor. |
add |
Add or remove personal web parts on a web part Page. |
add |
Add items to lists, add documents to document libraries, and add Web discussion comments. |
apply |
Apply a style sheet (.css file) to the Web site. |
apply |
Apply a theme or borders to the entire Web site. |
approve |
Approve a minor version of a list item or document. |
browse |
Enumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces. |
browser |
View information about users of the Web site. |
cancel |
Discard or check in a document which is checked out to another user. |
create |
Create e-mail alerts. |
create |
Create a group of users that can be used anywhere within the site collection. |
create |
Create a Web site using Self-Service Site Creation. |
delete |
Delete items from a list, documents from a document library, and Web discussion comments in documents. |
delete |
Delete past versions of a list item or document. |
edit |
Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize web part Pages in document libraries. |
edit |
Allows a user to change his or her user information, such as adding a picture. |
empty |
Has no permissions on the Web site. Not available through the user interface. |
enumerate |
Enumerate permissions on the Web site, list, folder, document, or list item. |
full |
Has all permissions on the Web site. Not available through the user interface. |
layouts |
View the layouts page? |
manage |
Manage alerts for all users of the Web site. |
manage |
Create and delete lists, add or remove columns in a list, and add or remove public views of a list. |
manage |
Create and change permission levels on the Web site and assign permissions to users and groups. |
manage |
Create, change, and delete personal views of lists. |
manage |
Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites. |
manage |
Grant the ability to perform all administration tasks for the Web site as well as manage content. |
open | Allow users to open a Web site, list, or folder to access items inside that container. |
open |
View the source of documents with server-side file handlers. |
update |
Update web parts to display personalized information. |
use |
Use features that launch client applications; otherwise, users must work on documents locally and upload changes. |
use |
Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site. |
value | Returns the value of this SPPermission object |
view |
View forms, views, and application pages, and enumerate lists. |
view |
View items in lists, documents in document libraries, and view Web discussion comments. |
view |
View pages in a Web site. |
view |
View reports on Web site usage. |
view |
View past versions of a list item or document. |
Methods
has |
Function for testing whether a given permission mask has all of the requested permissions. |
has |
Function for testing whether a given permission mask has any of the requested permissions. |
has |
Function for testing whether a given permission mask has the requested permission. |
Constructor Details
(constructor)(value)
Constructs a new instance of the SPPermission
class
constructor(value: IODataBasePermission);
Parameters
- value
- IODataBasePermission
Property Details
addAndCustomizePages
Add, change, or delete HTML pages or web part Pages, and edit the Web site using a SharePoint Foundation-compatible editor.
static readonly addAndCustomizePages: SPPermission;
Property Value
addDelPrivateWebParts
Add or remove personal web parts on a web part Page.
static readonly addDelPrivateWebParts: SPPermission;
Property Value
addListItems
Add items to lists, add documents to document libraries, and add Web discussion comments.
static readonly addListItems: SPPermission;
Property Value
applyStyleSheets
Apply a style sheet (.css file) to the Web site.
static readonly applyStyleSheets: SPPermission;
Property Value
applyThemeAndBorder
Apply a theme or borders to the entire Web site.
static readonly applyThemeAndBorder: SPPermission;
Property Value
approveItems
Approve a minor version of a list item or document.
static readonly approveItems: SPPermission;
Property Value
browseDirectories
Enumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces.
static readonly browseDirectories: SPPermission;
Property Value
browserUserInfo
View information about users of the Web site.
static readonly browserUserInfo: SPPermission;
Property Value
cancelCheckout
Discard or check in a document which is checked out to another user.
static readonly cancelCheckout: SPPermission;
Property Value
createAlerts
createGroups
Create a group of users that can be used anywhere within the site collection.
static readonly createGroups: SPPermission;
Property Value
createSSCSite
Create a Web site using Self-Service Site Creation.
static readonly createSSCSite: SPPermission;
Property Value
deleteListItems
Delete items from a list, documents from a document library, and Web discussion comments in documents.
static readonly deleteListItems: SPPermission;
Property Value
deleteVersions
Delete past versions of a list item or document.
static readonly deleteVersions: SPPermission;
Property Value
editListItems
Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize web part Pages in document libraries.
static readonly editListItems: SPPermission;
Property Value
editMyUserInfo
Allows a user to change his or her user information, such as adding a picture.
static readonly editMyUserInfo: SPPermission;
Property Value
emptyMask
Has no permissions on the Web site. Not available through the user interface.
static readonly emptyMask: SPPermission;
Property Value
enumeratePermissions
Enumerate permissions on the Web site, list, folder, document, or list item.
static readonly enumeratePermissions: SPPermission;
Property Value
fullMask
Has all permissions on the Web site. Not available through the user interface.
static readonly fullMask: SPPermission;
Property Value
layoutsPage
manageAlerts
Manage alerts for all users of the Web site.
static readonly manageAlerts: SPPermission;
Property Value
manageLists
Create and delete lists, add or remove columns in a list, and add or remove public views of a list.
static readonly manageLists: SPPermission;
Property Value
managePermissions
Create and change permission levels on the Web site and assign permissions to users and groups.
static readonly managePermissions: SPPermission;
Property Value
managePersonalViews
Create, change, and delete personal views of lists.
static readonly managePersonalViews: SPPermission;
Property Value
manageSubwebs
Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.
static readonly manageSubwebs: SPPermission;
Property Value
manageWeb
Grant the ability to perform all administration tasks for the Web site as well as manage content.
static readonly manageWeb: SPPermission;
Property Value
Remarks
Activate, deactivate, or edit properties of Web site scoped Features through the object model or through the user interface (UI). When granted on the root Web site of a site collection, activate, deactivate, or edit properties of site collection scoped Features through the object model. To browse to the Site Collection Features page and activate or deactivate site collection scoped Features through the UI, you must be a site collection administrator.
open
Allow users to open a Web site, list, or folder to access items inside that container.
static readonly open: SPPermission;
Property Value
openItems
View the source of documents with server-side file handlers.
static readonly openItems: SPPermission;
Property Value
updatePersonalWebParts
Update web parts to display personalized information.
static readonly updatePersonalWebParts: SPPermission;
Property Value
useClientIntegration
Use features that launch client applications; otherwise, users must work on documents locally and upload changes.
static readonly useClientIntegration: SPPermission;
Property Value
useRemoteAPIs
Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site.
static readonly useRemoteAPIs: SPPermission;
Property Value
value
Returns the value of this SPPermission object
get value(): IODataBasePermission;
Property Value
viewFormPages
View forms, views, and application pages, and enumerate lists.
static readonly viewFormPages: SPPermission;
Property Value
viewListItems
View items in lists, documents in document libraries, and view Web discussion comments.
static readonly viewListItems: SPPermission;
Property Value
viewPages
viewUsageData
View reports on Web site usage.
static readonly viewUsageData: SPPermission;
Property Value
viewVersions
View past versions of a list item or document.
static readonly viewVersions: SPPermission;
Property Value
Method Details
hasAllPermissions(requestedPerms)
Function for testing whether a given permission mask has all of the requested permissions.
hasAllPermissions(...requestedPerms: SPPermission[]): boolean;
Parameters
- requestedPerms
Any number of SPPermission objects to be compared against the original
Returns
boolean
hasAnyPermissions(requestedPerms)
Function for testing whether a given permission mask has any of the requested permissions.
hasAnyPermissions(...requestedPerms: SPPermission[]): boolean;
Parameters
- requestedPerms
Any number of SPPermission objects to be compared against the original
Returns
boolean
hasPermission(requestedPerm)
Function for testing whether a given permission mask has the requested permission.
hasPermission(requestedPerm: SPPermission): boolean;
Parameters
- requestedPerm
- SPPermission
The SPPermission object to be compared against the original
Returns
boolean