Namespace: patchBuilderPermissions

patchBuilderPermissions

Specifies operations to patch the permissions of a document.

Methods


add(role, capabilities) → {patchBuilder.PatchOperation}

Specifies a role to add to a document's permissions; takes a configuration object with the following named parameters or, as a shortcut, a role string and capabilities string or array.
Parameters:
Name Type Description
role string the name of a role defined in the server configuration
capabilities string | Array.<string> the capability or an array of capabilities from the insert|update|read|execute enumeration
Since:
  • 1.0
Returns:
a patch operation
Type
patchBuilder.PatchOperation

remove(role) → {patchBuilder.PatchOperation}

Specifies a role to remove from a document's permissions.
Parameters:
Name Type Description
role string the role to remove from access to the document
Since:
  • 1.0
Returns:
a patch operation
Type
patchBuilder.PatchOperation

replace(role, capabilities)

Specifies different capabilities for a role with permissions on a document; takes a configuration object with the following named parameters or, as a shortcut, a role string and capabilities string or array.
Parameters:
Name Type Description
role string the name of an existing role with permissions on the document
capabilities string | Array.<string> the role's modified capability or capabilities from the insert|update|read|execute enumeration
Since:
  • 1.0
Copyright (c) 2020 MarkLogic Corporation Documentation generated by JSDoc 4.0.0 on 2024-08-19T23:06:48-07:00 using the DocStrap template.