Hi,
Confirmed with Django 1.11, Python 3.4.3.
I strongly think this is a case you can report in bug tracker. Please tell 
if you will do.
I have been trying to find some time to test this since I read your message.

On Wednesday, April 12, 2017 at 4:12:30 AM UTC-4, Meiyer wrote:
>
> Just yesterday I bumped into an issue that left me puzzled for a while, 
> and I want to verify if this is indeed the case before opening a bug ticket.
>
> The documentation 
> <https://docs.djangoproject.com/en/1.11/topics/auth/default/#permissions> 
> states the we can use either the {{ perms.my_app.update_obj }} tag  to 
> display the result of a check for a specific permission "update_obj" within 
> the my_app module/app, or the {{ perms.my_app }} tag to display the 
> result of a check if the user has any permissions in the my_app module/app. 
> Yet, when using the second variant, I suddenly had the whole permission set 
> of the user dumped to the page. This is quite obvious when looking at 
> the contrib\auth\context_processors.py code: when doing a {% if "my_app" 
> in perms %} check it will land into the __contains__ method 
> of PermWrapper while for an output such as {{ perms.my_app }}, it will 
> land into the __getitem__ method that returns a PermLookupDict, in turn 
> triggering the __repr__ method when displayed:
>
>     def __repr__(self):
>         return str(self.user.get_all_permissions()) 
>
> This is clearly in odds with the documentation. So what is the expected 
> result? Should {{ perms.my_app }} display a True or (at least, no more 
> than) the permissions the user has in the my_app module/app?
>

-- 
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+unsubscr...@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/d4673c2a-a10f-4cba-a93a-f3f04eeda053%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to