Thanks Christian,
I'm afraid I am not in position to suggest any alternative, but in fact adding documents to collections is something that (IMHO) should be possible in xquery. I was accustomed to doing that in exist-db. But if it is not possible, I will have to find a possible alternative.
Thanks for your quick answer
Isidro
Em 12-07-2011 21:33, Christian GrĂ¼n escreveu:
Isidro,
thanks for your mail.
I am trying to use xquery file:write function to create new documents but it seems only ADMIN users can do that. This is a little bit limited (IMHO) as I don't want to give admin privileges to my users.
The main reason here is that file:write() is part of the file module, in which all functions require ADMIN rights. Next, the file:write() function can be used in a destructive way as well. For example, it can be used to overwrite other database files, or change configuration files that are otherwise only accessible to the admin user. So I'm sorry that this constraint might be too restrictive for your scenario. We are open for alternative suggestions that cover security issues like the mentioned one (some things would be easier if we coupled user management to the operating system, but as we want to stay platform independent, we introduced our own user management).
I also try to give the user ADMIN privileges to the correspondent database but although it seems possible in the HELP, the fact is that it is not.
The help output on command line is probably too compact to give you all the details. Please have a look into our documentation instead:
http://docs.basex.org/wiki/User_Management http://docs.basex.org/wiki/Commands
Feel free to ask for more, Christian
avast! Antivirus: Inbound message clean. Virus Database (VPS): 110712-1, 12-07-2011 Tested on: 12-07-2011 22:21:42 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110712-1, 12-07-2011 Tested on: 13-07-2011 12:11:46 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com