#9036: Discrepancy in admin permissions
----------------------------------+-----------------------------------------
 Reporter:  anonymous             |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  django.contrib.admin  |     Version:  1.0       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 in django.contrib.admin.sites.AdminSite.index permissions are calculated
 like so:

 {{{
                 perms = {
                     'add': model_admin.has_add_permission(request),
                     'change': model_admin.has_change_permission(request),
                     'delete': model_admin.has_delete_permission(request),
                 }
 }}}

 but then in django.contrib.admin.sites.AdminSite.app_index permissions are
 done like this:

 {{{
                     perms = {
                         'add': user.has_perm("%s.%s" % (app_label,
 model._meta.get_add_permission())),
                         'change': user.has_perm("%s.%s" % (app_label,
 model._meta.get_change_permission())),
                         'delete': user.has_perm("%s.%s" % (app_label,
 model._meta.get_delete_permission())),
                     }
 }}}

 Personally I perfer the way that index does it, but either way, it just
 needs to be standardized so we don't have different pages giving different
 results.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9036>
Django <http://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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to