Browse Source

Add pinned apps staff check

Denis K 8 năm trước cách đây
mục cha
commit
bd86a2467b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      jet/forms.py

+ 1 - 1
jet/forms.py

@@ -71,7 +71,7 @@ class ToggleApplicationPinForm(forms.ModelForm):
 
     def clean(self):
         data = super(ToggleApplicationPinForm, self).clean()
-        if not self.request.user.is_authenticated():
+        if not self.request.user.is_authenticated() or not self.request.user.is_staff:
             raise ValidationError('error')
         return data