User .get_all_permissions() vs. .has_perm() inconsistency

2012-02-10 Thread dslowik
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 ...Shou

Re: User .get_all_permissions() vs. .has_perm() inconsistency

2012-02-11 Thread dslowik
ue If the user is not superuser, it returns False. u.has_perm() returns true for ANY permission if u is superuser. >>> u.has_perm("wb.anything") True This solves the problem. Thanks for the help Andy. :) Don Slowik On Feb 10, 10:49 pm, Andy McKay wrote: > On Fr