#18763: Shortcut to get users by permission
-------------------------------------+-------------------------------------
     Reporter:  shelldweller         |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  contrib.auth         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Design
    Has patch:  0                    |  decision needed
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by shelldweller):

 It would be also useful to have this functionality somehow exposed on the
 admin site. Right now there is no easy way to find out who is authorized
 to do what.

 @pelletier:

 - UserManager sounds like the right way to do it but I initially decided
 against it because I wanted a quick and dirty is_superuser flag. Otherwise
 I'd have to manually construct the Q object every time I'd want to include
 superusers into the list.

 - Having the "reverse" method would be useful indeed.

 - I used the string instead of Permission object because it's how django
 operates already (e.g., in `user.has_perm('foo.add_bar')`)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18763#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to