Loading TOC...

MarkLogic 10 Product Documentation
sec.credentialSetPermissions

sec.credentialSetPermissions(
   credential-name as String,
   permissions as element(sec.permission)[]
) as null

Summary

This function updates the permission for the specified credential.

Parameters
credential-name The name of the credential.
permissions The set of permissions to assign to the credential.

Required Privileges

http://marklogic.com/xdmp/privileges/credential-set-permissions

Usage Notes

This function must be executed against the security database.

Example



    declareUpdate();
    const sec = require('/MarkLogic/security.xqy');

    sec.credentialSetPermissions("my-secure-credential", 
          (xdmp.permission("develoment", "read","element"),
           xdmp.permission("administrators", "update","element")));


      

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