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 | bb623859fbe5702a117fe29da7fd88746e4c27c8 (patch) | |
tree | f002f73336c0ffa7ec3b98449f6a2df511b7465b | |
parent | 069472f1867e50467837ef8b6c42a766019c0021 (diff) | |
download | Ishtar-bb623859fbe5702a117fe29da7fd88746e4c27c8.tar.bz2 Ishtar-bb623859fbe5702a117fe29da7fd88746e4c27c8.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 |