wlanslovenija / django-tastypie-mongoengine

MongoEngine support for django-tastypie.
Other
73 stars 59 forks source link

BUGFIX: Added authorization check for `MongoEngineListResource`. #86

Open yjaaidi opened 9 years ago

yjaaidi commented 9 years ago

Hi,

Authorization is not working with MongoEngineListResource.

I added calls to authorized_... in obj_create, obj_delete and obj_update.

ghost commented 9 years ago

This would resolve #70. Not really sure why you're bumping the version number in this pull request though.

yjaaidi commented 9 years ago

Oh yes ! I think it should solve the issue.

Concerning the bump, this is just a mistake because I'm used to bump my hotfixes using git flow.

danstovall commented 9 years ago

I noticed that there were no modifications to the unit tests. I know it is a small change, but I would feel better merging things in if we had a unit test that specifically covered this change. If you add in some tests and sign off on the changes I will merge them in.

yjaaidi commented 9 years ago

Oh ok I understand. I've just been lazy as we have unit tests for this on our app wishtack.com but didn't take time yet to add same tests on django-tastypie-mongoengine.

Anyway, I'm taking care of this.

On Tue Nov 18 2014 at 4:42:54 PM Dan Stovall notifications@github.com wrote:

I noticed that there were no modifications to the unit tests. I know it is a small change, but I would feel better merging things in if we had a unit test that specifically covered this change. If you add in some tests and sign off on the changes I will merge them in.

— Reply to this email directly or view it on GitHub https://github.com/wlanslovenija/django-tastypie-mongoengine/pull/86#issuecomment-63490374 .

mitar commented 9 years ago

Great! Thanks.

Also please sure you try to keep the code style. So compare it with the rest of the code. Like where we have empty lines and not and so on. :-)