Patch for #491

Fix for issue #491, a bug in the permissions system.
Merge remote-tracking branch 'origin/pr/492'
Added user_permissions to Django User object (#491, #492)