MarkLogic 10 Product Documentation
view.schemaSetPermissions

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

Summary

This function sets permissions on the specified schema specification. Any existing permissions for the schema and removed.

Parameters
schema-name The name of the schema specification.
permissions The permissions to set on 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.schemaSetPermissions('main', (xdmp.permission('app-user', 'read'),
                                       xdmp.permission('app-user', 'update')));

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