Re: has_perm returns wrong value

2012-11-14 Thread Joseph Mutumi
I believe default permissions created are: add_*, change_* and delete_*. And the format for a permission would be something like: *app_name*.add_* model_name* So what happens when you try: user.has_perm('structures.add_post') user.has_perm('structures.change_post') If you are registering your ow

has_perm returns wrong value

2012-11-14 Thread Brehnen Wong
>>> user.user_permissions.all() [, , , , , ] >>> user.has_perm('structures.edit_post') False >>> user.has_perm('structures.create_post') False >>> -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https:

has_perm returns wrong value

2012-11-14 Thread Brehnen Wong
When I do user.has_perm(), I get FALSE, but I have added permissions to user manually with user.user_permissions.add(51) on the django console/shell, and I even show all the permissions with user.user_permissions.all(). (Also, if i use user.has_perm('sdlfjksdf'), it returns FALSE rather than a