MarkLogic Server 11.0 Product Documentation
sec.roleSetExternalNames

sec.roleSetExternalNames(
   role-name as String,
   external-name as String[]
) as null

Summary

This function sets a role to be matched to one or more external LDAP distinguished names.

Parameters
role-name The role to be set for the external user.
external-name A sequence of one or more external LDAP distinguished names to be associated with the named role.

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-external-names("admin", ("UID=joe,CN=Users,DC=MARKLOGIC1,DC=COM"))

(: Sets the external LDAP distinguished name for the "admin" role to 
   "UID=joe,CN=Users,DC=MARKLOGIC1,DC=COM". :)
    

Example


    // execute this against the Security database
    declareUpdate();
    const sec = require('/MarkLogic/security.xqy');
    
    sec.roleSetExternalNames("admin", ("UID=joe,CN=Users,DC=MARKLOGIC1,DC=COM"));
    // Sets the external LDAP distinguished name for the "admin" role to "UID=joe,CN=Users,DC=MARKLOGIC1,DC=COM".
   
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy