uncopenweb / torongo

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

Update on Admin:Schemas item rejected #19

Closed parente closed 14 years ago

parente commented 14 years ago

I'm a dev. I opened the Admin:Schemas collection with "crud". The getMode method returns "crud". When I attempt to update the schema attribute of an existing item in the db, I get the following error:

403: Forbidden update not permitted (Mode not in allowed set)

gbishop commented 14 years ago

Fixed. It requires an update to uow.js as well. We should house those function with the library they relate to and then just put a reference in uow.js.

parente commented 14 years ago

Problem still exists after the fix. Notice the wrong mode is still going out in the header.

Request URL:http://localhost/data/Admin/Schemas/4ca785d82f8a550a45000011 Request Method:PUT Status Code:403 Forbidden Request Headers Accept:application/json,application/javascript Authorization:r-17847fe3e5-dc1184c31f168e21fe547e0fde403df00cf9f44d Cache-Control:max-age=0 Content-Type:application/json; charset=UTF-8 Origin:http://localhost Referer:http://localhost/catalog/ Transaction:commit User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 X-Requested-With:XMLHttpRequest

gbishop commented 14 years ago

It worked fine for me. Did you get both pieces? You need the update to uow as well. It won't do anything without it.

parente commented 14 years ago

Hm. Thought I did. I'll check again.

parente commented 14 years ago

I missed the uow.js update, but now I see the uow.data.mangeDatabase / getDatabase functions are not pushed to torongo master. uow.js tries to use them, but they're not there.

parente commented 14 years ago

Fixed.