Untitled
unknown
typescript
4 years ago
7.1 kB
7
Indexable
import { IODataBasePermission } from '@microsoft/sp-odata-types'; /** * This class can be used to determine if the current user has a requested set of permissions. * Specifies the built-in permissions available in SharePoint Foundation * Derived from OneDriveWeb/ODBNext/odsp-shared * https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx * @public */ export default class SPPermission { /** * Has no permissions on the Web site. Not available through the user interface. */ static readonly emptyMask: SPPermission; /** * View items in lists, documents in document libraries, and view Web discussion comments. */ static readonly viewListItems: SPPermission; /** * Add items to lists, add documents to document libraries, and add Web discussion comments. */ static readonly addListItems: SPPermission; /** * 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; /** * Delete items from a list, documents from a document library, and Web discussion comments in documents. */ static readonly deleteListItems: SPPermission; /** * Approve a minor version of a list item or document. */ static readonly approveItems: SPPermission; /** * View the source of documents with server-side file handlers. */ static readonly openItems: SPPermission; /** * View past versions of a list item or document. */ static readonly viewVersions: SPPermission; /** * Delete past versions of a list item or document. */ static readonly deleteVersions: SPPermission; /** * Discard or check in a document which is checked out to another user. */ static readonly cancelCheckout: SPPermission; /** * Create, change, and delete personal views of lists. */ static readonly managePersonalViews: SPPermission; /** * Create and delete lists, add or remove columns in a list, and add or remove public views of a list. */ static readonly manageLists: SPPermission; /** * View forms, views, and application pages, and enumerate lists. */ static readonly viewFormPages: SPPermission; /** * Allow users to open a Web site, list, or folder to access items inside that container. */ static readonly open: SPPermission; /** * View pages in a Web site. */ static readonly viewPages: SPPermission; /** * View the layouts page? */ static readonly layoutsPage: SPPermission; /** * 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; /** * Apply a theme or borders to the entire Web site. */ static readonly applyThemeAndBorder: SPPermission; /** * Apply a style sheet (.css file) to the Web site. */ static readonly applyStyleSheets: SPPermission; /** * View reports on Web site usage. */ static readonly viewUsageData: SPPermission; /** * Create a Web site using Self-Service Site Creation. */ static readonly createSSCSite: SPPermission; /** * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites. */ static readonly manageSubwebs: SPPermission; /** * Create a group of users that can be used anywhere within the site collection. */ static readonly createGroups: SPPermission; /** * Create and change permission levels on the Web site and assign permissions to users and groups. */ static readonly managePermissions: SPPermission; /** * Enumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces. */ static readonly browseDirectories: SPPermission; /** * View information about users of the Web site. */ static readonly browserUserInfo: SPPermission; /** * Add or remove personal web parts on a web part Page. */ static readonly addDelPrivateWebParts: SPPermission; /** * Update web parts to display personalized information. */ static readonly updatePersonalWebParts: SPPermission; /** * Grant the ability to perform all administration tasks for the Web site as well as manage content. * Activate, deactivate,or edit properties of Web site scoped Features through the object model or * through the user interface (UI). When grantedon 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. */ static readonly manageWeb: SPPermission; /** * Use features that launch client applications; otherwise, users must work on documents locally and upload changes. */ static readonly useClientIntegration: SPPermission; /** * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site. */ static readonly useRemoteAPIs: SPPermission; /** * Manage alerts for all users of the Web site. */ static readonly manageAlerts: SPPermission; /** * Create e-mail alerts. */ static readonly createAlerts: SPPermission; /** * Allows a user to change his or her user information, such as adding a picture. */ static readonly editMyUserInfo: SPPermission; /** * Enumerate permissions on the Web site, list, folder, document, or list item. */ static readonly enumeratePermissions: SPPermission; /** * Has all permissions on the Web site. Not available through the user interface. */ static readonly fullMask: SPPermission; private _value; constructor(value: IODataBasePermission); /** * Returns the value of this SPPermission object */ readonly value: IODataBasePermission; /** * Function for determining if a given permission mask has any of the requested permissions. * @param requestedPerms - Any number of SPPermission objects to be compared against the original */ hasAnyPermissions(...requestedPerms: SPPermission[]): boolean; /** * Function for determining if a given permission mask has all of the requested permissions. * @param requestedPerms - Any number of SPPermission objects to be compared against the original */ hasAllPermissions(...requestedPerms: SPPermission[]): boolean; /** * Function for checking if a given permission mask has the requested permission. * @param requestedPerm - The SPPermission object to be compared against the original */ hasPermission(requestedPerm: SPPermission): boolean; }
Editor is loading...