diff options
| author | Magnus Hagander | 2025-06-02 13:29:09 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2025-06-02 13:29:09 +0000 |
| commit | 3ecd0920291870304ce71e5b6800d310b84b3fc2 (patch) | |
| tree | 2abb6156395a0850db6fd2365096f024fa9ae843 /pgmailmgr | |
| parent | f99f26ef6520b59fc2cba9b777aa6f41fbb1b5ef (diff) | |
Only allow superusers to edit mail quota
Diffstat (limited to 'pgmailmgr')
| -rw-r--r-- | pgmailmgr/mailmgr/forms.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pgmailmgr/mailmgr/forms.py b/pgmailmgr/mailmgr/forms.py index 91ee7bd..657e906 100644 --- a/pgmailmgr/mailmgr/forms.py +++ b/pgmailmgr/mailmgr/forms.py @@ -65,6 +65,9 @@ class VirtualUserForm(forms.ModelForm): if self.instance.pk: self.fields['local_domain'].disabled = True + if not user.is_superuser: + del self.fields['mail_quota'] + def clean_local_domain(self): if not self.instance.pk: return self.cleaned_data['local_domain'] |
