#19060: has_perm() raises exception when used with custom user inheriting AbstractUser ---------------------------------+-------------------------------------- Reporter: ivan_virabyan | Owner: nobody Type: Bug | Status: new Component: contrib.auth | Version: master Severity: Release blocker | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+--------------------------------------
Comment (by ivan_virabyan): No, it doesnt solve this problem. This bug is caused by auth backend, which assumes user model to have name User: {{{ Permission.objects.filter(group__user=user_obj) }}} so when our custom model has name {{{ CustomUser}}}, it doesnt work, because filter expression must be of the form {{{ group__customuser }}} -- Ticket URL: <https://code.djangoproject.com/ticket/19060#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.