This function sets the options on the temporal collection.
Parameters
temporal-collection
The name of the temporal collection.
options
Options to control access to the temporal collection:
updates-admin-override
Specifies that users with the admin role can change or delete
temporal documents using non-temporal functions, such as
xdmp:document-insert and
xdmp:document-delete.
archive-default-dir=dir
When archive-default-dir is specified to be a non-empty value
and when you specify to protect a document with a relative archive path,
the archive file path is the concatenation of this value, / and the relative path.
document-protect-priv=priv_URI
Specifies the privilege required to call the
temporal:documentProtect
function. By default,
temporal:documentProtect
requires the
http://marklogic.com/xdmp/privileges/temporal-document-protect
privilege. An empty value means that no user except admin is allowed to call
temporal:documentProtect.
Specifies the privilege required to perform admin-override operations.
By default, only users with the admin role are allowed for these
operations and only when updates-admin-override option is specified.
Example
var temporal = require("/MarkLogic/temporal.xqy");
temporal.collectionSetOptions("kool", ["updates-admin-override"]) ;
// Sets the "updates-admin-override" option on the "kool" collection.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.