#9414: Documentation on has_perm and the permission_required decorator is
confusing
---------------------------+------------------------------------------------
 Reporter:  wallenfe       |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Documentation  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 The documentation on using has_perm and permission_required is confusing
 in that it does not define how the permission string that is passed to
 those functions is defined.

 The documentation should mention that the string is:
 ApplicationName.PermissionName.

 Since Permissions are defined on models, my first inclination was to try:
 ModelName.PermissionName


 This is the documentation page I am referring to:
 http://docs.djangoproject.com/en/dev/topics/auth/#topics-auth

 And an example of the permission string being used, but without an
 explanation.
 "
 def my_view(request):
     if not (request.user.is_authenticated() and
 request.user.has_perm('polls.can_vote')):
 "

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9414>
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 django-updates@googlegroups.com
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