#30034: Shows wrong user on list_display in LogEntryAdmin
-------------------------------------+-------------------------------------
     Reporter:  Muslu Y.             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.admin        |                  Version:  2.1
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  logentry,            |             Triage Stage:
  logentryadmin, list_display,       |  Unreviewed
  wrong user                         |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Muslu Y.:

Old description:

> Hi all;
>
> Logs are listed wrongly at list records on page (list_display -
> change_list.html).
>
> For example;
> Wrong user (username:muslu) in **/admin/admin/logentry/**
> True user (username:admin) in **/admin/admin/logentry/1/change/**
>

> {{{
> class LogEntryAdmin(admin.ModelAdmin):
>     list_display = ['content_type', 'user', 'object_repr', 'action_time']
>     list_filter = ['user', 'content_type']
> }}}
>

>
> Django: 2.1.3
> settings.AUTH_USER_MODEL: default
> DATABASE_ROUTERS: at this system we are using 2 projects on different
> servers but we are accessing both project from one SQL server. So we use
> only one SQL user table. (Users are same for all projects.)
> (router.AuthRouter)

New description:

 Hi;

 This is my admin.py in custom application.

 admin.py:

 {{{

 from django.contrib.admin.models import LogEntry

 class LogEntryAdmin(admin.ModelAdmin):
     list_display = ['content_type', 'user', 'object_id', 'object_repr',
 'action_time']
     date_hierarchy = 'action_time'
     list_filter = ['user', 'content_type']
     ordering =  ['-action_time']

     def has_add_permission(self, request):
         return False

     def has_change_permission(self, request, obj=None):
         return False

     def has_delete_permission(self, request, obj=None):
         return False

 admin.site.register(LogEntry,LogEntryAdmin)

 }}}


 If I checked **/admin/app/model/1593/history/** and
 **/admin/admin/logentry/** on model's history, It's showing wrong user who
 changed record.

 But when I entering **/admin/admin/logentry/2228/change/** then It's
 showing True user in page.

 I added screen shots.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30034#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.8de9bae4dbd9049b4300c690845a7222%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to