diff options
Diffstat (limited to 'ishtar_common/menu_base.py')
-rw-r--r-- | ishtar_common/menu_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/menu_base.py b/ishtar_common/menu_base.py index 02e110910..37f482219 100644 --- a/ishtar_common/menu_base.py +++ b/ishtar_common/menu_base.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -57,7 +57,8 @@ class MenuItem: return True for access_control in self.access_controls: access_control = self.model._meta.app_label + '.' + access_control - if user.has_perm(access_control, self.model): + if user.has_perm(access_control, self.model) or \ + access_control in user.get_group_permissions(): return True # manage by person type if hasattr(user, 'ishtaruser'): |