Here is the code form my Python 2.6.6 session which is puzzling me:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username='clint')
>>> u.get_all_permissions()
set([u'wb.delete_libraryitem', u'wb.change_libraryitem'])
>>> u.has_perm("wb.change_libraryitem")
True

...Shouldn't that be False?


I'm really trying to use permission checking as in:
{% if perms.foo.can_vote %}
as discussed in:
https://docs.djangoproject.com/en/1.2/topics/auth/#authentication-data-in-templates
, where I was expecting a False and got that True, but I've tracked
the problem down to the above puzzle.

I'm running
>>> django.VERSION
(1, 2, 3, 'final', 0)


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to