소스 검색

Add pinned apps staff check

Denis K 8 년 전
부모
커밋
bd86a2467b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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