diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-01-24 14:47:53 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-01-24 14:47:53 +0100 | 
| commit | d175aa8f929edbbd0f58b22532be17ec2dbeb078 (patch) | |
| tree | f002f73336c0ffa7ec3b98449f6a2df511b7465b | |
| parent | 5c99f6b53afd5432f1fdf60a400bbe7fc1b715b0 (diff) | |
| download | Ishtar-d175aa8f929edbbd0f58b22532be17ec2dbeb078.tar.bz2 Ishtar-d175aa8f929edbbd0f58b22532be17ec2dbeb078.zip | |
Administrators have got the power
| -rw-r--r-- | ishtar/furnitures/backend.py | 3 | ||||
| -rw-r--r-- | ishtar/furnitures/forms.py | 2 | 
2 files changed, 4 insertions, 1 deletions
| diff --git a/ishtar/furnitures/backend.py b/ishtar/furnitures/backend.py index d7d3384a8..ae77d8610 100644 --- a/ishtar/furnitures/backend.py +++ b/ishtar/furnitures/backend.py @@ -51,6 +51,9 @@ 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"): +            return True          if obj is None:              model_name = perm.split('_')[-1].capitalize()              if not hasattr(models, model_name): diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index d2bd36794..82bfcb88e 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -567,7 +567,7 @@ class FinalAccountForm(forms.Form):      final = True      form_label = _("Confirm")      send_password = forms.BooleanField(label=_(u"Send the new password by " -                                               u"email?")) +                                               u"email?"), required=False)      def __init__(self, *args, **kwargs):          self.is_hidden = True | 
