diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-23 18:25:58 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-23 18:25:58 +0200 |
commit | 5cdbb2055adc8b23413b5e35ddb13635d5ad24c9 (patch) | |
tree | 9743bec37b2c651fafecfc373a1d5bb8bc2aadc3 /ishtar_common/menu_base.py | |
parent | db55fe482c5c428fdaca938efe380dc2060f8803 (diff) | |
download | Ishtar-5cdbb2055adc8b23413b5e35ddb13635d5ad24c9.tar.bz2 Ishtar-5cdbb2055adc8b23413b5e35ddb13635d5ad24c9.zip |
PersonType from single value to multi value for Person
Diffstat (limited to 'ishtar_common/menu_base.py')
-rw-r--r-- | ishtar_common/menu_base.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ishtar_common/menu_base.py b/ishtar_common/menu_base.py index 37f482219..11ce4e688 100644 --- a/ishtar_common/menu_base.py +++ b/ishtar_common/menu_base.py @@ -62,8 +62,7 @@ class MenuItem: return True # manage by person type if hasattr(user, 'ishtaruser'): - person_type = user.ishtaruser.person.person_type - if person_type.rights.filter(wizard__url_name=self.idx).count(): + if ishtar_user.has_right(self.idx): return True return False @@ -76,8 +75,7 @@ class MenuItem: return True # manage by person type if hasattr(user, 'ishtaruser'): - person_type = user.ishtaruser.person.person_type - if person_type.rights.filter(wizard__url_name=self.idx).count(): + if ishtar_user.has_right(self.idx): return True return False |