Dear All,
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.
In other hand, it also seems incoherent as the user can add documents to data base directly from command line.
add as t.xml <r/>
Path '/t.xml' added in 24.72 ms.
xquery declare namespace fx="http://expath.org/ns/file";
fx:write('file1.xml','<w/>') Stopped at line 1, column 78: [BASX0005] ADMIN permission needed.
xquery declare namespace fx="http://expath.org/ns/file";
fx:write('./file1.xml','<w/>') Stopped at line 1, column 80: [BASX0005] ADMIN permission needed.
xquery declare namespace fx="http://expath.org/ns/file";
fx:write('/f.xml','<w/>') Stopped at line 1, column 75: [BASX0005] ADMIN permission needed.
---------------------------------------------------------------------------------------------------------------------------------
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.
show users on test
Username Read Write --------------------- test X X
1 Users.
help grant
GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [database]) TO [user] Grant user permissions.
Grants permissions (on a database) to a user.
grant admin on test to test
ADMIN permission is unknown.
grant create on test to test
CREATE permission is unknown.
So, my question is: These are bugs, limitations, or some kind of wrong understood on my part?
Thanks
Isidro
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110712-0, 12-07-2011 Tested on: 12-07-2011 17:38:29 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com