Hi all I have the following function and I encounter a problem with permissions.
If I grant the user default user of the http server the admin role I get results but without the admin role the function returns no results. I would be happy to have some pointers of what permissions the user needs to be able to complete the request. declare function meta:get-diffscore($bookid as xs:string) as xs:string { let $bookiri := concat("metaLit:",$bookid) let $evalOptions := <options xmlns="xdmp:eval"> <isolation>different-transaction</isolation> <prevent-deadlocks>true</prevent-deadlocks> <database>{xdmp:database($c:IMAGE_DATABASE_NAME)}</database> </options> let $evalString := concat( ' import module namespace sem = "http://marklogic.com/semantics" at "/MarkLogic/semantics.xqy"; sem:sparql(" PREFIX metaLit: <',$c:semLiteraturePrefix,'> PREFIX meta: <',$c:semMetaPrefix,'> SELECT ?diffScore WHERE { ',$bookiri,' meta:RTdiffScore ?diffScore} ") ') return (sem:query-results-serialize(xdmp:eval($evalString,(),$evalOptions))//sparqlRes:binding[@name="diffScore"]//text(),"")[1] }; Regards Erik Zander
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general