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

Reply via email to