uncopenweb / torongo

Utilities for using Mongo with Tornado.
6 stars 1 forks source link

_owner backward incompatibility #16

Closed parente closed 14 years ago

parente commented 14 years ago

I'm on the catalog page. I try to delete an item from the catalog -> status collection. The schema for the collection according to the SetupAdminCollection script is:

test = '''{ "type": "object", "properties": { "word": { "type": "string", "maxLength": 25 }, "value": { "type": "integer" } }, "additionalProperties": false }'''

Client side, an old item in the collection looks like this:

id: "/data/catalog/status/4ca783682f8a55052a00002d" isDirty: true parent: Array (13) _id: "4ca783682f8a55052a00002d" dt: "2010-10-02T19:09:28Z" from: "http://localhost/catalog/#dbtool" __proto: Object

When I try to delete it, get a 403, probably because the owner field is missing. I'm logged in as a dev.

Is there an upgrade strategy for old records?

gbishop commented 14 years ago

The default is supposed to be if the record has no owner anyone can operate on it. I got the logic wrong on delete. I pushed a change to fix it.

parente commented 14 years ago

Thanks.