sec:user-set-default-collections( $user-name as xs:string, $collections as xs:string* ) as empty-sequence()
Sets the default collections of a user with name $user-name to $collections.
Parameters | |
---|---|
user-name | The name of a user. |
collections | A sequence of collections. |
http://marklogic.com/xdmp/privileges/user-set-default-collections
If a user with name $user-name is not found, an error is raised.
This function must be executed against the security database.
(: 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:user-set-default-collections("Jim", ("http://marklogic.com/jim_modules", "http://marklogic.com/jim_docs")) (: Sets the default collections for the user, "Jim," to "http://marklogic.com/jim_modules" and "http://marklogic.com/jim_docs". Any other previously set collections are removed.