Closed mikerhodes closed 8 years ago
@mikerhodes we are not wrapping _security
documents as Document
for that very reason. For now we are using the share_database and unshare_database methods to manage permissions for users and API keys. So the _security
document would be updated that way. I suppose that I see your point in that you want to be able to handle the _security
document as a Document so we can let this issue track that enhancement. As for the "rev" finding it should not be an issue other than in this case but again the _security
document was not meant to be wrapped as a Document when this library was initially written.
@mikerhodes - I spoke to @evansde77 about setting permissions and the sharing databases. I've summarized the major points of our conversation below:
@alfinkel Seems clearer. For me, the naming of share/unshare is very use-case specific (to sharing databases) -- therefore editing the _security doc to add permissions is a separate thing.
I've opened #98 to split out the work involving the share_database missing roles. So this Issue is just for the direct management of the security document.
You cannot update a _security document using python-cloudant. If you run the following script:
You get a problem because
_security
documents do not have_rev
fields (they are not versioned in the same way):I should've spotted this issue; it's probably an issue elsewhere too.