#35584: Discard user full names from admin log entries
-------------------------------------+-------------------------------------
     Reporter:  Kamil Paduszyński    |                    Owner:  (none)
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  contrib.admin        |                  Version:  5.0
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------
Comment (by Kamil Paduszyński):

 Sarah, Mariusz - thanks for responding so quickly.

 Indeed, I don't have to override the `get_full_name`. The point is I don't
 want to keep the `first_name` and `last_name` fields in the model. I
 simply don't find them useful in the `auth` app in general - this app
 intends to handle authentication and authorization, not personal data. The
 best place to add the latter would be the custom `AbstractUser` (not
 `AbstractBaseUser`) subclasses (it's my personal opinion though).

 Going with:

 {{{
 #!python
 class CustomUser(AbstractBaseUser):
     ...
 }}}

 suggested by Mariusz results in permissions unhandled (yeah, I know I can
 add `PermissionMixin` 🙂 - but it's just another point to remember) and
 some important fields (`email`, `is_staff`, `is_active`) missing. I think
 most of the projects would like to have those functionalities in their
 custom user models...

 Anyway, I respect your decision, and thank you guys for the discussion 👍

 Replying to [comment:2 Sarah Boyce]:
 > Hi Kamil, can you not overwrite `get_full_name` to return `""` (an empty
 string, which is False-y and should achieve the same thing as overwriting
 the template)?
 >
 > This feels slightly related to #28089. I think the docs around
 
[https://docs.djangoproject.com/en/5.0/topics/auth/customizing/#django.contrib.auth.models.CustomUser.get_full_name
 CustomUser.get_full_name()] might want an update to add that the default
 is a concatenation of the first and last name rather than "If implemented,
 this appears alongside the username in an object’s history" (which doesn't
 feel 100% accurate).
 >
 > The request to completely drop `get_full_name` from the admin log
 entries would need a wider discussion, as so I will close this as wontfix
 for now, please raise this on the
 [https://forum.djangoproject.com/c/internals/5 Django forum] to gain a
 consensus that this should be updated. 👍
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35584#comment:4>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070190941c74fb-1783900b-32a9-431f-a073-a42c387344a1-000000%40eu-central-1.amazonses.com.

Reply via email to