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
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
2 matches
Mail list logo