#35792: Enhance _get_group_permissions method of ModelBackend
--------------------------------------+------------------------------------
     Reporter:  Bona Fide IT GmbH     |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.auth          |                  Version:  4.2
     Severity:  Normal                |               Resolution:
     Keywords:  Backend               |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

 * stage:  Unreviewed => Accepted

Comment:

 Tentatively accepting

 Looks like the SQL before:
 {{{#!sql
 SELECT "django_content_type"."app_label" AS "content_type__app_label",
        "auth_permission"."codename" AS "codename"
 FROM "auth_permission"
 INNER JOIN "auth_group_permissions" ON ("auth_permission"."id" =
 "auth_group_permissions"."permission_id")
 INNER JOIN "auth_group" ON ("auth_group_permissions"."group_id" =
 "auth_group"."id")
 INNER JOIN "auth_user_groups" ON ("auth_group"."id" =
 "auth_user_groups"."group_id")
 INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" =
 "django_content_type"."id")
 WHERE "auth_user_groups"."user_id" = 3
 }}}

 SQL after:
 {{{#!sql
 SELECT "django_content_type"."app_label" AS "content_type__app_label",
        "auth_permission"."codename" AS "codename"
 FROM "auth_permission"
 INNER JOIN "auth_group_permissions" ON ("auth_permission"."id" =
 "auth_group_permissions"."permission_id")
 INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" =
 "django_content_type"."id")
 WHERE "auth_group_permissions"."group_id" IN
     (SELECT U0."id"
      FROM "auth_group" U0
      INNER JOIN "auth_user_groups" U1 ON (U0."id" = U1."group_id")
      WHERE U1."user_id" = 3)
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35792#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/0107019265bfe938-53987c6b-2058-4388-9690-a7b1473ee386-000000%40eu-central-1.amazonses.com.

Reply via email to