Hey Danny,

On 4.2-5, this example from docs.marklogic.com throws an error, 
"XDMP-NONMIXEDCOMPLEXCONT: 
fn:data(fn:doc("http://marklogic.com/xdmp/privileges/16284477237313398015";)/sec:privilege)
 -- Node has complex type with non-mixed complex content" evidently because it 
doesn't actually want an sec:privilege element, but the sec:privilege-id.

admin:appserver-set-privilege($config, admin:appserver-get-id($config, 
$groupid, "myAppServer"),
        xdmp:eval(
                'xquery version "1.0-ml";
                import module "http://marklogic.com/xdmp/security"; at 
"/MarkLogic/security.xqy";
                sec:get-privilege("http://marklogic.com/my.uri";, "execute")',
      (),  
     <options xmlns="xdmp:eval">
     <database>{xdmp:security-database()}</database>
     </options>))

Changing it to this works:

sec:get-privilege("http://marklogic.com/my.uri";, "execute")/sec:privilege-id

Best,

Will
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to