Hi Tim, 4 points here:
1) If you want your code to import the security module, it should import it at the path "/MarkLogic/security.xqy" as / resolves relative to the Modules directory. 2) Your users will not be able to run code in that module unless they have the security role, and you do not want to give them the security role (as then they can do almost anything). So you will have to encapsulate that code into your own function and then amp that function. 3) Note the security.xqy needs to be run against the security database, so you will probably need to do an eval or invoke against the security db. 4) If what you are talking about is permissions as you say, then security.xqy is likely not the tool you need. Permissions are on documents, not stored in the security db. Users should be able to see the permissions of documents that they have permissions to read (using xdmp:document-get-permissions, for example). I think point 1 is probably what you are running into, but I also think this is probably not going to do what you think it is, so you might want to step back and look at what you are trying to do. -Danny From: [email protected] [mailto:[email protected]] On Behalf Of Tim Meagher Sent: Monday, November 14, 2011 10:44 AM To: 'General MarkLogic Developer Discussion' Subject: [MarkLogic Dev General] XDMP-MODNOTFOUND: (err:XQST0059) Module /opt/MarkLogic/Modules/MarkLogic/security.xqy not found I have written a module that checks user permissions before deciding what features they can access in a web form. The code imports the security module which is mapped to /opt/MarkLogic/Modules/MarkLogic/security.xqy, but it appears that non-admin users cannot find the security module. Is there a role that I can simply assign to the pertinent user to avoid this problem? I'm running MarkLogic 4.1. Thank you! Tim Meagher
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
