#30705: Django template permissions not working when used inside the template 
of an
inclusion tag
-------------------------------------+-------------------------------------
               Reporter:  erev0s     |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Template   |        Version:  2.2
  system                             |       Keywords:  permissions,
               Severity:  Normal     |  inclusion tag
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I have 2 apps in a Django Project i am using to learn django. In the app A
 I have an inclusion tag where I am using a template named
 `templateA.html`. This inclusion tag is being used in the app B, inside
 the template `templateB.html`. The content of `templateA.html` is shown
 properly inside `templateB.html`.

 I noticed though that when I am attempting to check permissions of the
 user using code similar to the following:
 {{{
 {% if perms.appA.can_do_something %}
 show something here
 {% endif %}
 }}}
 then, if I include that code in `templateA.html` it is not working, while
 if I use it in `templateB.html` it is working properly.  I am mentioning
 again that the `templateA.html` is the one used in the inclusion tag I am
 using in the `templateB.html`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30705>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.ace1023ee8a2fa8f55cde40a64dcd204%40djangoproject.com.

Reply via email to