#35584: Discard user full names from admin log entries
-------------------------------------+-------------------------------------
Reporter: Kamil PaduszyĆski | Type:
| Cleanup/optimization
Status: new | Component:
| contrib.admin
Version: 5.0 | 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
-------------------------------------+-------------------------------------
The `get_full_name` of the `auth.AbstractUser` model is used to indicate a
user in the admin's object history:
{{{
#!default
<td>{{ action.user.get_username }}{% if action.user.get_full_name %} ({{
action.user.get_full_name }}){% endif %}</td>
}}}
In some circumstances, personal data like `first_name` or `last_name`
(used in the mentioned method) are generally handled by a different model,
where the `AUTH_USER_MODEL` is for the authentication data and permissions
only.
Given I discard `first_name` and `last_name` from my user model and mark
the respective methods as raising `NotImplementedError`, I have to
remember to override the entire huge `content` block just to update a
single line of code... In the case of the `get_short_name` method used in
the `admin/base.html` template, the issue is much easier to resolve due to
a better template organization (there, an update in a single block
`welcome-msg` is needed).
Therefore, I think it would be better to remove the reference to
`get_full_name` from the template, simply by replacing it by:
{{{
#!default
<td>{{ action.user.get_username }}</td>
}}}
In my opinion, a username is enough to identify a user associated with a
log.
--
Ticket URL: <https://code.djangoproject.com/ticket/35584>
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/010701909230bde3-c8a7c224-2043-45dd-b103-664c18a05783-000000%40eu-central-1.amazonses.com.