diff --git a/AUTHORS b/AUTHORS index 1126166e..ce015e68 100644 --- a/AUTHORS +++ b/AUTHORS @@ -183,3 +183,4 @@ that much better: * Joe Friedl (https://github.com/grampajoe) * Daniel Ward (https://github.com/danielward) * Aniket Deshpande (https://github.com/anicake) + * rfkrocktk (https://github.com/rfkrocktk) \ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst index 427d2106..406fe82c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,7 @@ Changelog Changes in 0.8.5 ================ +- Added user_permissions to Django User object (#491, #492) - Fix setting Geo Location fields (#488) - Fix handling invalid dict field value (#485) - Added app_label to MongoUser (#484) diff --git a/mongoengine/django/auth.py b/mongoengine/django/auth.py index 33a48eb6..f0f5ea1b 100644 --- a/mongoengine/django/auth.py +++ b/mongoengine/django/auth.py @@ -117,7 +117,7 @@ class Permission(Document): class Meta: verbose_name = _('permission') - verbose_name_plural = _('permissions')U + verbose_name_plural = _('permissions') # unique_together = (('content_type', 'codename'),) # ordering = ('content_type__app_label', 'content_type__model', 'codename') @@ -229,7 +229,7 @@ class User(Document): verbose_name=_('last login')) date_joined = DateTimeField(default=datetime_now, verbose_name=_('date joined')) - + user_permissions = ListField(ReferenceField(Permission), verbose_name=_('user permissions'), help_text=_('Permissions for the user.'))