jazzband / django-mongonaut

Built from scratch to replicate some of the Django admin functionality and add some more, to serve as an introspective interface for Django and Mongo.
MIT License
240 stars 67 forks source link

Permission Error #65

Open yigitguler opened 10 years ago

yigitguler commented 10 years ago

Hi, I just saw this project and i am very excited about it. But i am unable to make it work until now.

Here is my pip freeze command output:

Django==1.6.2
pymongo==2.3
mongoengine==0.8.7
django-mongonaut==0.2.19

I think that everything is OK here.

I have a custom user model and here is my terminal output

>>> from project.profiles.models import *
>>> u = UserProfile.objects.get(email="b@b.com")
>>> u.is_authenticated()
True
>>> u.is_staff
True
>>> u.is_superuser
True

So my logged-in user has all necessary permissions (Regarding the documentation.)

My Model:

class FBUser(Document):
    app_id = StringField(required=False)
    facebook_id = StringField(required=True)
    facebook_ids = ListField(StringField())

    meta = {'collection': 'friends_of_friends_network'}

My admin file (appname/mongoadmin.py)

FBUser.mongoadmin = MongoAdmin()

When i type http://ubuntu.local:8000/mongonaut/ What i get is a 403 response: You do not have permissions to access this content.

I read the documentation 5 times, checked the source but unable to find any clue. Do you have any ideas?

Thank you.

garrypolley commented 10 years ago

Thanks for looking at django-mongonaut.

This may seem like a silly question, but are you logged in to your application locally? It wasn't mentioned in the steps, so I just want to make sure that isn't the case before I delve too deep into a rabbit hole.

haard commented 10 years ago

I'm having the same issue; created empty app, set up a few models, a superuser, and mongonaut - but cannot access it, only getting "You do not have permissions to access this content.". Shouldn't mongonaut prompt me for credentials if I'm not already logged in?

Edit: logging in through other means make it work. Still would be nice to have mongonaut trigger and take care of login if necessary.