Open luffah opened 3 years ago
Tested with curl:
getfiles.xml
<?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> <d:prop> <oc:id /> <oc:fileid /> </d:prop> </d:propfind>
_curl(){ echo "<!-- $* -->" curl --silent \ -k \ -X $1 \ --data "$2" \ -u ${NC_USER}:${NC_USER_PWD} \ "$3" | xmllint --format - } # let's assume to ease example that passwords are the same for all user NC_USER=ncadmin _curl PROPFIND @getfiles.xml $NC_DAV_URL/files/${NC_USER} # -> <d:status>HTTP/1.1 200 OK</d:status>
NC_USER=test _curl PROPFIND @getfiles.xml $NC_DAV_URL/files/${NC_USER}
NC_USER=ncadmin _curl PROPFIND @getfiles.xml $NC_DAV_URL/files/test
In methods list_folders, you can specify the user, therefore an altenative user, but i did'nt have any success using this. To have this not working is not so bad... it could imply many security issues.