diff options
Diffstat (limited to 'ishtar_common/backend.py')
-rw-r--r-- | ishtar_common/backend.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ishtar_common/backend.py b/ishtar_common/backend.py index f50edd708..297c96180 100644 --- a/ishtar_common/backend.py +++ b/ishtar_common/backend.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2011 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-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 @@ -50,8 +50,7 @@ class ObjectOwnPermBackend(object): assert perm.split('.')[-1].split('_')[1] == 'own' except (IndexError, AssertionError): return False - if ishtar_user.person.person_type \ - == models.PersonType.objects.get(txt_idx="administrator"): + if ishtar_user.has_right('administrator'): return True if obj is None: model_name = perm.split('_')[-1].capitalize() |