Skip to content

Allow Django AuthenticationBackends to work with Django user #573

merged 1 commit into from Oct 1, 2012

2 participants


Updated the mongoengine.django.auth.User so that authentication backends can use permissions.

Currently if you attempt to use an AuthenticationBackend that has a has_perm method, this will error out because the mongoengine User does not have a has_perm or a get_all_permissions method.

The methods I have added are nearly a complete copy paste from the existing Django User. The imported underscore functions spin through the backends and check permissions as the backend is programmed to do.

@garrypolley garrypolley referenced this pull request in garrypolley/django_generic_permissions Sep 27, 2012

MongoEngine can now be used as a backend. #6

@rozza rozza merged commit 9f8d6b3 into hmarr:master Oct 1, 2012
rozza commented Oct 1, 2012

Thanks @garrypolley

@rozza rozza added a commit to MongoEngine/mongoengine that referenced this pull request Oct 1, 2012
@rozza rozza Added Garry Polley to contributors list e8604d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.