MarkLogic 12 EA 1 Product Documentation
sec:role-set-default-collections

sec:role-set-default-collections(
   $role-name as xs:string,
   $collections as xs:string*
) as empty-sequence()

Summary

Sets the default collections of a role with name $role-name to $collections.

Parameters
role-name The name of a role.
collections A sequence of collections.

Required Privileges

http://marklogic.com/xdmp/privileges/role-set-default-collections

Usage Notes

If a role with name $role-name is not found, an error is raised.

This function must be executed against the security database.

Example


(: execute this against the security database :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
     "/MarkLogic/security.xqy";

sec:role-set-default-collections("Developer", 
    ("http://marklogic.com/dev_modules", 
     "http://marklogic.com/dev_docs"))

(: Sets the default collections for the role, "Developer," to 
"http://marklogic.com/dev_modules" and "http://marklogic.com/dev_docs".
 Any other previously set collections are removed.
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy