Django user get_all_permissions() is empty while user_permissions is set

Posted by Murkin on Stack Overflow See other posts from Stack Overflow or by Murkin
Published on 2010-01-17T13:15:01Z Indexed on 2010/05/03 13:18 UTC
Read the original article Hit count: 138

Filed under:

Hello

I added some permissions to a user via the admin interface.

From some reason all the perm functions fail, e.g

>>> user.get_all_permissions()
set([])

But accessing the table directly, works:

>>> user.user_permissions.all()
(list of permissions as expected)

What can cause the "get_all_permissions" (and all the perm functions like has_perm()) to fail ?

Thanks

© Stack Overflow or respective owner

Related posts about django