
view.schemaAddPermissions( schema-name as String, permissions as Sequence ) as null
This function adds permissions to the specified schema specification.
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.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.