3

I have an app that makes user of filtering certain things for users with different permissions.

Django 1.1 does for some reason not seem to recognize these.

I have a group called corporate and permissions are granted as needed.

now in my template I am render the following.

{% if perms.corporate %}
...show the following
{% else %}
... show something else
{% endif %}

why is this not rendering the info I want?

ApPeL
  • 4,801
  • 9
  • 47
  • 84
  • have you tried what {{ perms.corporate }} returns? – Uku Loskit Jul 20 '10 at 10:11
  • 2
    Depends on what the value of `perms` is in the form context. The form -- by itself -- isn't enough information to answer the question. The context created by the view function is **essential** information. Please UPDATE the question with the context created by the view function for the form. Please do not comment. Please UPDATE. – S.Lott Jul 20 '10 at 10:12

1 Answers1

4

perms.corporate proxies to User.has_module_perms('corporate'). So you need to have a module (or app) labeled corporate. You say your current corporate is a group, so this probably won't work.

muksie
  • 12,565
  • 1
  • 19
  • 14
  • thanks, yeah I was trying to go the wrong route. So is there anyway that you can call the `Group` instead of the permissions? or is this the wrong route I might be taking? – ApPeL Jul 21 '10 at 07:00