incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mclean, Adam" <adam.mcl...@rbc.com>
Subject Deleting a document that has been 'copied'.
Date Thu, 15 May 2014 20:15:48 GMT
When using my application user which has 'member' permissions in my database, and an entry
in the validate_doc_update design document to permit newDoc._deleted:

When I create a document (using POST - document contains inline attachment stubs), I am able
to delete that created document without any problems.

If I 'copy' that created document (using http://wiki.apache.org/couchdb/HTTP_Document_API#COPY)
to a new document within the same database, I am not able to delete the copied document. 
When I attempt to delete the copied document I get response:
{"error":"forbidden","reason":"Only admins may delete documents"}

This 'throw' does not exist anywhere in my validate_doc_update.  Nor can I find it in google
(numerous 'Only admins may' matches, but none with that exact phrase).

I'm using Couch 1.3.1.  Have I stumbled on a bug, or is this expected behaviour for copied
documents?

Thanks!

_______________________________________________________________________

This email may be privileged and/or confidential, and the
sender does not waive any related rights and obligations.
Any distribution, use or copying of this email or the
information it contains by other than an intended recipient
is unauthorized. If you received this email in error,
please advise the sender (by return email or otherwise)
immediately. You have consented to receive the attached
electronically at the above-noted email address; please retain a
copy of this confirmation for future reference.

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce
pas aux droits et obligations qui s'y rapportent. Toute diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il
contient par une personne autre que le (les) destinataire(s)
désigné(s) est interdite. Si vous recevez ce courriel par erreur,
veuillez en aviser l'expéditeur immédiatement, par retour de courriel
ou par un autre moyen. Vous avez accepté de recevoir le(s) document(s)
ci-joint(s) par voie électronique à l'adresse courriel indiquée ci-dessus;
veuillez conserver une copie de cette confirmation pour les fins de reference future.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message