
xdmp:document-set-permissions( $uri as xs:string, $permissions as element(sec:permission)* ) as empty-sequence()
  Sets the permissions on the named document (or directory) to the given
  permissions, replacing any permissions previously set on the
  document (or directory).  To preserve
  any existing permissions, use
  xdmp:document-add-permissions.
  .
  The user must have update permissions on the document or directory.
| Parameters | |
|---|---|
| uri | The document URI. | 
| $permissions | Permission elements. | 
  xdmp:document-set-permissions(
    "/example.xml",
    (xdmp:permission("development", "update"),
     xdmp:permission("qa", "read")))