Hi Jay,
Thanks, I got it worked.
It is said in the developers document that if we do not specify the
permissions explicitly while creating the document, then the default
permissions fo the user will be included as the permissions of the
document.
But this is not happening with the dls:document-insert-and-manage()
function.
when i am passing xdmp:default-permissions() as the fifth argument to
dls:document-insert-and-manage then the document is getting the default
permissions of the user.
Thanks and Regards,
Santhosh Rajasekaran
Jay Runkel <[email protected]>
Sent by: [email protected]
08/07/2009 08:58 PM
Please respond to
General Mark Logic Developer Discussion <[email protected]>
To
General Mark Logic Developer Discussion <[email protected]>
cc
Subject
RE: [MarkLogic Dev General] Problem in Managing the document under version
control for non admin user - reg.,
Santhosh,
This is probably a user permission issue. They way you are calling
dls:document-insert-and-manage, the permissions on the document ?book.xml?
will correspond to the users default permission settings. If these are not
set, then the user will not have any permission to read the document.
Try executing the function:
dls:document-set-permissions(?book.xml?, xdmp:permission(?yourUserRole?,
?read?))
after your call to dls:document-insert-and-manage. This should give your
user the ability to read the document. Note, you can do the same thing by
passing the permissions as the fifth argument to
dls:document-insert-and-manage.
Jay
From: [email protected] [
mailto:[email protected]] On Behalf Of Santhosh Raj
Sent: Friday, August 07, 2009 10:05 AM
To: [email protected]
Subject: [MarkLogic Dev General] Problem in Managing the document under
version control for non admin user - reg.,
Hi all,
I am using Marklogic server 4.1-1.
I want to place the documents under Managed version control. So,
1) I created a user(non-admin) and gave dls-user,app-builder Role to the
user.
2) And also gave some other previliges required to execute a query in cq.
The previliges are:
admin-module-read
xdmp:add-response-header
xdmp:document-get
xdmp:eval
xdmp:eval-in
xdmp:filesystem-directory
xdmp:invoke
xdmp:invoke-in
xdmp:save
xdmp:eval-modules-change
xdmp:eval-modules-change-file
xdmp:invoke-modules-change
xdmp:invoke-modules-change-file
3) I executed the following query to manage and insert the document to
marklogic server.
xquery version "1.0-ml";
import module namespace dls = "http://marklogic.com/xdmp/dls"
at "/MarkLogic/dls.xqy";
let $contents :=
<BOOK>
<TITLE>Baz Goes to the Disco</TITLE>
<CHAPTER1>
<TITLE>Baz Wakes Up to James Brown and Feels Funky</TITLE>
</CHAPTER1>
</BOOK>
return
dls:document-insert-and-manage(
"book.xml",
fn:true(),
$contents)
It had executed successfully.
After this when I execute doc("book.xml") to view the content- I am not
getting the content., I can not checkout the document. It is giving
DOCNOTFOUND exception.
Note: This non-admin user can view the normal file (which is not managed
under version control). He can not read/view the Documents Managed under
version control.
If i login as admin user then i can view the content uploaded.(i.e
book.xml) and do all the action on the file.
Please let me know What is going wrong. What are the roles and privileges
need to be given to the user to perform check-out, checkin and etc.,
Thanks and Regards,
Santhosh Rajasekaran
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
ForwardSourceID:NT0000F176
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general