[Django] #30012: Ability to specify a custom AnonymousUser

1 view
Skip to first unread message

Django

unread,
Dec 5, 2018, 10:24:13 AM12/5/18
to django-...@googlegroups.com
#30012: Ability to specify a custom AnonymousUser
-----------------------------------------+------------------------
Reporter: Sanket Saurav | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Currently, it isn't possible to tell Django auth to use a custom
AnonymousUser.
https://github.com/django/django/blob/master/django/contrib/auth/__init__.py#L179

There is a case in favour of the need for this: if an application uses a
custom user model, there can be additional properties and methods added to
it, and it makes sense for the AnonymousUser to be able to mirror those
properties (even if they are falsey). For the sake of coherence, I believe
it makes sense to have the ability to specify a custom AnonymousUser
class, just as the AbstractUser.

--
Ticket URL: <https://code.djangoproject.com/ticket/30012>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 5, 2018, 10:30:14 AM12/5/18
to django-...@googlegroups.com
#30012: Ability to specify a custom AnonymousUser
-------------------------------+------------------------------------

Reporter: Sanket Saurav | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Simon Charette):

* stage: Unreviewed => Accepted


Comment:

That makes sense to me.

Did you have any implementation in mind? I was thinking a class attribute
on `AbstractUser` could do?

--
Ticket URL: <https://code.djangoproject.com/ticket/30012#comment:1>

Django

unread,
Dec 5, 2018, 10:31:29 AM12/5/18
to django-...@googlegroups.com
#30012: Ability to specify a custom AnonymousUser
-------------------------------+-------------------------------------

Reporter: Sanket Saurav | Owner: nobody
Type: New feature | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by Simon Charette):

* status: new => closed
* resolution: => duplicate


Comment:

Actually this is a duplicate of #20313.

--
Ticket URL: <https://code.djangoproject.com/ticket/30012#comment:2>

Reply all
Reply to author
Forward
0 new messages