Added user_permissions to Django User object (#491, #492)

This commit is contained in:
Ross Lawley 2013-11-29 11:48:14 +00:00
parent d902a74ab0
commit 855efe7fe8
3 changed files with 4 additions and 2 deletions

View File

@ -183,3 +183,4 @@ that much better:
* Joe Friedl (https://github.com/grampajoe) * Joe Friedl (https://github.com/grampajoe)
* Daniel Ward (https://github.com/danielward) * Daniel Ward (https://github.com/danielward)
* Aniket Deshpande (https://github.com/anicake) * Aniket Deshpande (https://github.com/anicake)
* rfkrocktk (https://github.com/rfkrocktk)

View File

@ -4,6 +4,7 @@ Changelog
Changes in 0.8.5 Changes in 0.8.5
================ ================
- Added user_permissions to Django User object (#491, #492)
- Fix setting Geo Location fields (#488) - Fix setting Geo Location fields (#488)
- Fix handling invalid dict field value (#485) - Fix handling invalid dict field value (#485)
- Added app_label to MongoUser (#484) - Added app_label to MongoUser (#484)

View File

@ -117,7 +117,7 @@ class Permission(Document):
class Meta: class Meta:
verbose_name = _('permission') verbose_name = _('permission')
verbose_name_plural = _('permissions')U verbose_name_plural = _('permissions')
# unique_together = (('content_type', 'codename'),) # unique_together = (('content_type', 'codename'),)
# ordering = ('content_type__app_label', 'content_type__model', 'codename') # ordering = ('content_type__app_label', 'content_type__model', 'codename')
@ -229,7 +229,7 @@ class User(Document):
verbose_name=_('last login')) verbose_name=_('last login'))
date_joined = DateTimeField(default=datetime_now, date_joined = DateTimeField(default=datetime_now,
verbose_name=_('date joined')) verbose_name=_('date joined'))
user_permissions = ListField(ReferenceField(Permission), verbose_name=_('user permissions'), user_permissions = ListField(ReferenceField(Permission), verbose_name=_('user permissions'),
help_text=_('Permissions for the user.')) help_text=_('Permissions for the user.'))