Re: [MarkLogic Dev General] Setting Permission Issue

2013-04-01 Thread Michael Blakeley
Take a look at the function signature at 
http://docs.marklogic.com/xdmp:document-set-permissions

xdmp:document-set-permissions(
  $uri as xs:string,
  $permissions as element(sec:permission)*
) as empty-sequence()

You're supplying an arg2 as xs:string+, when it has to be 
element(sec:permission)*. Use http://docs.marklogic.com/xdmp:permission to 
construct a permission element, as in the docs example:

xdmp:document-set-permissions(
"/example.xml", 
(xdmp:permission("development", "update"), 
 xdmp:permission("qa", "read")))

-- Mike

On 1 Apr 2013, at 13:58 , "Khan, Kashif"  wrote:

> I am running the following query to give "Access-Role" read permission but
> I get the error  "[1.0-ml] XDMP-NOTANODE: (err:XPTY0019)
> xdmp:document-set-permissions(fn:document-uri($x), ("Access-Role","read"))
> -- "AHD-Access-Role" is not a node"
> 
> for $x in xdmp:directory("/app/", "1")
> return
> xdmp:document-set-permissions(fn:document-uri($x), ("Access-Role","read"))
> 
> 
> Any help in understanding this issue will be greatly appreciated.
> 
> 
> Kashif Khan
> 
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
> 

___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Setting Permission Issue

2013-04-01 Thread Khan, Kashif
I am running the following query to give "Access-Role" read permission but
I get the error  "[1.0-ml] XDMP-NOTANODE: (err:XPTY0019)
xdmp:document-set-permissions(fn:document-uri($x), ("Access-Role","read"))
-- "AHD-Access-Role" is not a node"

for $x in xdmp:directory("/app/", "1")
return
xdmp:document-set-permissions(fn:document-uri($x), ("Access-Role","read"))


Any help in understanding this issue will be greatly appreciated.


Kashif Khan


___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general