Hi Pragya, The problem is not the permissions on the XML document, but on the test.xqy. The READER role needs execute permission on test.xqy, otherwise the test.xqy cannot be invoked by that user.
The default permissions only act at document insert/update. Default permissions are applied to the document being inserted/updated. I think your READER role doesn't need any default permissions, but your WRITER role should include a 'read' and an 'execute' permission for the READER role. Also make sure you use the WRITER to upload the test.xqy to your modules database. Kind regards, Geert drs. G.P.H. (Geert) Josten Consultant Daidalos BV Hoekeindsehof 1-4 2665 JZ Bleiswijk T +31 (0)10 850 1200 F +31 (0)10 850 1199 [email protected]<mailto:[email protected]> www.daidalos.nl<http://www.daidalos.nl/> KvK 27164984 De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Pragya Kapoor Sent: dinsdag 3 augustus 2010 11:28 To: [email protected] Subject: [MarkLogic Dev General] reader role &user permissions I have created below user and roles: Users Role default permissions WRITER WRITER execute,update, insert,read READER READER read When I run the following query using the READER user: Xdmp:invoke("/test/test.xqy") It give me following error: 1.0-ml] XDMP-NOPROGRAM: xdmp:invoke("/test/test.xqy") -- Server unable to build program from request Stack trace: line 2: 1: xquery version "1.0-ml"; 2: xdmp:invoke('/test/test.xqy') Whereas If I ran the simple query: fn:doc("test.xml) this give me results Also, I am loading the documents using WRITER user Let me know , what is the missing piece. Thanks, Pragya
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
