Friday, November 25, 2016

I am not able to access user_permissions without superuser access

I created a user with some permissions by django AbstractUser model without superuser/staff access, a simple user can say. Now I can login successfully and when I am trying to access permissions of user like request.user.user_permissions.all() in my ListView it gives me an error like "relation views_list_user_permissions does not exists". But If I tried to access permissions by superuser then I can, it seems like to me I am not able to use user_permission field correctly which is a m2m of Permission class. Please correct me If I am doing something wrong.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3a3ace22-36a8-4cc2-a753-c089bd534b4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment