MarkLogic 9 Product Documentation
view.schemaAddPermissionsview.schemaAddPermissions(
schema-name as String,
permissions as Sequence
) as null
Summary
This function adds permissions to the specified schema specification.
Parameters |
schema-name |
The name of the schema specification.
|
permissions |
The permissions to add to the schema specification.
When run in an XQuery context, the permissions are a sequence of
XML elements (sec:permission). When importing this module into
a Server-Side JavaScript context, the permissions are an array
of Objects.
|
Example
const view = require('/MarkLogic/views');
view.schemaAddPermissions('main', (xdmp.permission('test-user', 'read'),
xdmp.permission('test-user', 'update')));
// Enables users with the test-user role to read and update the 'main' schema.
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.