Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove is_staff from customer form
Unknown4616ee0bf719
diff --git a/saleor/dashboard/customer/forms.py b/saleor/dashboard/customer/forms.pyindex 34e56e1789..b0ef0c2503 100644--- a/saleor/dashboard/customer/forms.py+++ b/saleor/dashboard/customer/forms.py@@ -45,20 +45,11 @@ class CustomerForm(forms.ModelForm):self.user = kwargs.pop('user', None)super().__init__(*args, **kwargs)- # Only user with managing staff privilege or superuser- # can assign other user as staff- self.fields['is_staff'].disabled = True- if self.user and (- self.user.has_perms(['account.manage_staff'])- or self.user.is_superuser):- self.fields['is_staff'].disabled = False-# Disable editing following fields if user edits his own accountif self.user == self.instance:self.fields['email'].disabled = Trueself.fields['note'].disabled = Trueself.fields['is_active'].disabled = True- self.fields['is_staff'].disabled = Trueaddress = self.instance.default_billing_addressif not address:@@ -73,8 +64,7 @@ class CustomerForm(forms.ModelForm):class Meta:model = Userfields = [- 'first_name', 'last_name', 'email', 'note',- 'is_active', 'is_staff']+ 'first_name', 'last_name', 'email', 'note', 'is_active']labels = {'first_name': pgettext_lazy('Customer form: Given name field', 'Given name'),