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