Hi, I want to give a user temporary permission to read a document that was written by another user under certain circumstances. I'm using fn:doc to read the document. I tried wrapping the fn:doc in a local function and amping the local function but that does not seem to work. Do I have to amp fn:doc itself? That would be bad since I want to limit the scope of the amp.
I was able to get the functionality I want using eval and specifying the user-id of the user that wrote the document in the options. This required adding the xdmp:login privilege to the user which the docs warn against. I thought I could just amp the function to give the user the privilege for the duration of the function, but I must be creating the amp incorrectly because it does not seem to work. The function is local:view declared in a module in the Modules database (not on the file system) at the URI /Modules/modules/details.xqy. Here are the entries I'm using for the amp: Localname: view Namespace: http://www.w3.org/2005/xquery-local-functions Document uri: /Modules/modules/details.xqy Database: Modules I've also tried using /modules/details.xqy as the URI and that did not work either. Any ideas what I'm doing wrong or how to check that the amp is really being applied to the function? Bob
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
