MarkLogic Server 11.0 Product Documentation
view.addPermissions

view.addPermissions(
   schema-name as String,
   view-name as String,
   permissions as Sequence
) as null

Summary

This function adds permissions to those already set for the named view in the named schema specification.

Parameters
schema-name The name of the schema specification containing the view.
view-name The name of the view to which the permissions are to be added.
permissions The permissions to be added to the view. 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.addPermissions('main', 'songs', (xdmp.permission('test-user', 'read'),
                                         xdmp.permission('test-user', 'update')));

// Enables users with the test-user role to read and update the 'main' schema.
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy