Closed GoogleCodeExporter closed 9 years ago
This issue could be resolved pretty easily by adding a check right before the
affected line of code (351 of client.py):
if 'id' in data and 'rev' in data:
content.update({'_id': data['id'], '_rev': data['rev']})
Original comment by pokstad@gmail.com
on 15 Jun 2014 at 1:43
That solves one use case, but I think we have other problems with security
objects as well (i.e. just with receiving them?). We should try to solve all of
them, but I'm not sure what API would make sense. Maybe there should be
dedicated API.
Original comment by djc.ochtman
on 29 Jun 2014 at 9:26
Yes, it does fail on retrieval as well. Maybe an API like this:
db = server['meow']
db.readers.users = ['kitty']
db.admins.roles = ['poopsykins']
OR, this would be faster to execute in a single request:
db.security = {
'readers':{'users':['kitty']},
'admins':{'roles':['poopsykins']}
}
Original comment by pokstad@gmail.com
on 1 Jul 2014 at 3:54
Yeah, I think a db.security attribute could work pretty well.
Original comment by djc.ochtman
on 1 Jul 2014 at 6:13
Okay, a very basic implementation is in r7cd158aa7c1b. Please check whether
this fulfills your use cases.
Original comment by djc.ochtman
on 6 Jul 2014 at 11:40
Original issue reported on code.google.com by
pokstad@gmail.com
on 14 Jun 2014 at 6:13