Loading TOC...

Comment.data

Comment.data as String

Summary

This is inherited from the CharacterData object.

The character data.

Example

cts.doc("example.xml").firstChild.data;

Comments

  • Hi please have a look at the following code How to remove the rest-reader and rest-writer entire permissions on a particular document (How to delete their roles on a particular doc ) as the marklogic.patchBuilder.remove('role-name'); would not work on rest-reader and rest-writer roles? var marklogic=require('marklogic'); var conn=require('./connection.js'); var inst=marklogic.createDatabaseClient(conn.student); var ins=marklogic.createDatabaseClient(conn.admin); ins.documents.write({ 'uri' : '/test/exam.json', 'content' : { 'id' : 'AX456GH', 'status' : 'active' }, 'permissions' : [ { 'role-name' : 'rest-reader', 'capabilities' : ['read'] } ], 'collections' : ['confidential','readonlyme'], }).result(function(res){ console.log('Document written with URI '+res.documents[0].uri); var pb=marklogic.patchBuilder; ins.documents.patch({ 'uri' : '/test/exam.json', 'categories' : ['metadata'], 'operations' : [ pb.permissions.replace({'role-name': 'rest-writer','capabilities' : ['read']}) pb.permissions.remove('rest-reader'); //Not Working ] }); console.log(res); console.log(res.documents[0].uri); //console.log(res.documents[0].permissions); // console.log(res.documents[0].collections); },function(err){ console.log(JSON.stringify(err,null,2)); })
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy