SP.Web.doesUserHavePermissions Method (sp.js)

Returns whether the current user has the given set of permissions.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.Web.doesUserHavePermissions()

Parameters

Return value

Type: SP.BooleanResult

true if the user has the specified permissions; otherwise, false.

Remarks

It must not be null.

REST resource endpoint

See Web resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/doesUserHavePermissions(permissionMask)

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/doesUserHavePermissions(permissionMask)

Resource parameters

  • permissionMask