Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp:set-server-field-privilege

xdmp:set-server-field-privilege(
   $name as xs:string,
   $privilege as xs:string?
) as empty-sequence()

Summary

Sets the privilege of a named server field.

Parameters
name The name of the server field.
privilege The privilege action URI for the server field.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-set-server-field-privilege

Usage Notes

Changing the server field value on a field being used with a plugin will change the behavior of the plugin. Therefore, if you are using a server field in a plugin, it is a good practice to set a privilege on the server field to protect it from malicious or accidental updates.

Example

xdmp:set-server-field-privilege("foo", 
  "http://mydomain.com/privileges/foo-server-field")

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.